Skip to main content
Solved

How to create a new value whenever I come across a threshold in sorted data?

  • June 6, 2023
  • 2 replies
  • 9 views

wrijs
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 11 replies

Hello,

I have a dataset that looks similar to the image shown and I need to create the value in the attribute ROUTE shown in red. image.pngI need to create a new value for ROUTE whenever Duration>1 or Duration is Null. 

The data needs to be sorted firstly by Name, then by TimeStamp.

Then, whenever the previously mentioned condition of (Duration>1 or Duration is Null) is met, a new value needs to be created for ROUTE. 

How do I create a new value (with for example a new sequential number) whenever I come across (Duration>1 or Duration is Null) in my sorted data?

Best answer by geomancer

Use the Adjacent Feature Attributes option of the AttributeManager to have access to the attributes of the previous feature, and provide your logic as a Conditional Value.

Routenumber(Note: I added some extra logic where Name B begins. This may not be needed.)

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

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • June 7, 2023

Use the Adjacent Feature Attributes option of the AttributeManager to have access to the attributes of the previous feature, and provide your logic as a Conditional Value.

Routenumber(Note: I added some extra logic where Name B begins. This may not be needed.)


wrijs
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 11 replies
  • June 12, 2023

Use the Adjacent Feature Attributes option of the AttributeManager to have access to the attributes of the previous feature, and provide your logic as a Conditional Value.

Routenumber(Note: I added some extra logic where Name B begins. This may not be needed.)

That did the trick, thank you