Skip to main content
Solved

Setting up a dynamic conditional value for creating attribute

  • May 14, 2024
  • 1 reply
  • 82 views

lise
Contributor
Forum|alt.badge.img+3
  • Contributor

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)

View original
Did this help you find an answer to your question?

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+54

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)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings