Solved

Extract values from dynamically changing indices from a list

  • 15 January 2018
  • 3 replies
  • 9 views

Badge

Hi all,

I try to dynamically read values from a list, i.e. sometimes I need to extract the value at index 0, sometimes the value at index 5 and so on and then store the value to a new attribute. The index of the value I need to extract depends on the value of another attribute. The number of entries in the list is roughly limited to 10 in my use case, so I solved this problem with a conditional value in the AttributeManager. However, it'd be nice to know if there's a dynamic solution to this problem.

icon

Best answer by david_r 15 January 2018, 10:13

View original

3 replies

Userlevel 5
Badge +25

Yes, you can enter an attribute for the list index like this:

Userlevel 4

In addition to the solution proposed by @redgeographics, you can also use the ListIndexer transformer.

Badge

Thanks, both solutions work very well!

Reply