How to Update Attributes in a List

0
Hello all, I am trying to figure out the best way to update attributes in my lists. I currently have a list that is generated using an OData service that pulls all users that have logged into our Mendix apps. There is an attribute I have that would change whenever a user has last logged into one of our apps. I want this value to be able to be updated in the correct object without me having to delete the whole list and recreating that list. There are some attributes within that object that are not created from that OData service so I would lose those values if I deleted the list and recreated a new one.
asked
2 answers
1

If the data you are receiving has known (preferably unique) values you could use them to do a Retrieve with an XPath Constraint on the data already in your application. If this returns a match, you can use a Change Object action to update the attributes you are interested in. If it doesn't return a match, then it is a new item and you can use a Create Object action to add the new data.

 

https://docs.mendix.com/refguide/retrieve/#333-xpath-constraint

 

I hope this helps.

 

answered
1

You can iterate the list and change the attributes including associations.

answered