I want to make changes to a list of things that are displayed in a RG.
They don’t currently have ‘order numbers’, so on page load I’d like to allocate them an ‘order number’, which is the RGs cell index…any guidance on how to do this would be amazing please
Hi there, @lisaalger… if I understand your post correctly and just take it at face value, I don’t think it’s about the repeating group’s list of things and their associated indexes. Rather, it sounds like you need to loop through the repeating group’s data source on page load and make changes to each thing, with the change to make being to assign each thing a number that is the previous thing’s number plus 1.
Does that sound like what you are trying to do? If so, is there a particular reason you need to do it on page load?
I suppose page load is not essential if there’s a better way…
Each of my users have a list of services. I want to give them the ability to reorder these, but they currently do not have an order number. So my thinking was: on page load it would see the RG and allocate the cell index as the order number. I don’t want to mess with their current order as it shows to public
Can’t you populate the order field when each service is created by looking for the last service the user created and adding 1 to its order number to get the new service’s order number?
Sounds like a recursive backend workflow is in order (pun somewhat intended) here so you can feed it a user’s services and have it loop through each item to update its order number appropriately.