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?
Spot on Mike, thank you.
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
RG is currently sorted by creation date
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?
I can for new services added, but it’s for those already created that I want to change
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.
Ah ok, I’ll give that a go. Thank you for your time.
Can I check if I’m on the right route please…
Sorry, not a recurring event… create an API workflow and have the last step in the API workflow call the same workflow again (thus creating the loop).
Ohhhhhh sorry, that makes sense! Been looking at it too long clearly lol! Have a great evening and thanks for your help
This topic was automatically closed after 70 days. New replies are no longer allowed.