Looping through a list and returning value based on Index position?

0
Hi all, I am trying to implement a feature in my app, in which a user can copy and paste a line from a Google Sheet, and using the string split (from Community Commons) with a tab split, the app will automatically create a new object by going through the list and assigning each attribute accordingly. After the string split, I am using a loop to go through the list. Is there a way that I can set an object’s value to be based on the Index and its subsequent Value?  
asked
1 answers
0

You could implement this by creating a mapping entity defining the attributes that need to be set in a specific order.

Loop over the attribute names and use the index of this loop to assign the appropriate value.

Assigning values dynamically will need to take place in a java action as this way of dynamically setting values is not supported from the default microflow activities.

See https://apidocs.mendix.com/7/runtime/com/mendix/systemwideinterfaces/core/IMendixObjectMember.html

answered