Skip to main content
Solved

Extract values from dynamically changing indices from a list

  • January 15, 2018
  • 3 replies
  • 121 views

Forum|alt.badge.img

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.

Best answer by david_r

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

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

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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


david_r
Celebrity
  • Best Answer
  • January 15, 2018

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


Forum|alt.badge.img
  • Author
  • January 15, 2018

Thanks, both solutions work very well!


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