Skip to main content
Solved

Keep first feature after change

  • July 9, 2015
  • 2 replies
  • 47 views

ebygomm
Influencer
Forum|alt.badge.img+46
A 1 STARTED

 

A 2 IN PROGRESS

 

A 3 IN PROGRESS

 

A 4 PAUSED

 

A 5 IN PROGRESS

 

A 6 IN PROGRESS

 

A 7 COMPLETE

 

A 1 STARTED

 

B 2 IN PROGRESS

 

B 3 IN PROGRESS

 

B 4 IN PROGRESS

 

B 5 COMPLETE

 

 

I have a list of actions which are listed in the order they performed. Sometimes the actions do not result in a change in the attribute  I am interested in, so there are 'duplicate' entries. However I want to keep those duplicates where they appear either side of a status change.

 

 

So in the above examples I'd end up with

 

 

A 1 STARTED

 

A 2 IN PROGRESS

 

A 4 PAUSED

 

A 5 IN PROGRESS

 

A 7 COMPLETE

 

A 1 STARTED

 

B 2 IN PROGRESS

 

B 5 COMPLETE

 

 

I know how to do this in excel but I'm struggling to find a way to repeat it within FME

 

 

Best answer by takashi

Hi,

 

 

I would use an AttributeCreator with the "Enable Adjacent Feature Attributes" option and a Conditional Value to create an attribute which indicates whether the record should be kept. And then, filter the records by testing the attribute value, with a Tester.

 

Assuming that the field name is "status", the AttributeCreator parameters setting looks like this, for example.

 

 

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • Best Answer
  • July 9, 2015
Hi,

 

 

I would use an AttributeCreator with the "Enable Adjacent Feature Attributes" option and a Conditional Value to create an attribute which indicates whether the record should be kept. And then, filter the records by testing the attribute value, with a Tester.

 

Assuming that the field name is "status", the AttributeCreator parameters setting looks like this, for example.

 

 

 

Takashi

ebygomm
Influencer
Forum|alt.badge.img+46
  • Author
  • Influencer
  • July 9, 2015
Perfect, I'd never used those options within the AttributeCreator before