Skip to main content
Solved

Setting up a dynamic conditional value for creating attribute

  • May 14, 2024
  • 1 reply
  • 113 views

lise
Contributor
Forum|alt.badge.img+3

I’m  combining lines based on end noded while keeping some attributes in a list for each original lines (1). Then I create a new attribute based on the lists (2) with conditions based on numbers in the lists (3).

 

 

 

 

I would like to set up the condition statement dynamically: the number of lists varies each time I run the workflow so I would like to pick numbers from the last list available (in this case PR_list{2}) and do something like: PR_list{0}.ORIGINE < PR_list{max}.ORIGINE instead of choosing the list manually. 

 

Is it possible to create a dynamic condition in the condition value definition? 

Best answer by nielsgerrits

One way to do this is to use a ListElementCounter and use that result. Something like

@Value(PR_list{@Evaluate(@Value(_element_count)-1)}.ORIGINE)

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.

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+62

One way to do this is to use a ListElementCounter and use that result. Something like

@Value(PR_list{@Evaluate(@Value(_element_count)-1)}.ORIGINE)