How to remove a specific object from an array
Using Delete from Array utility - I don't know which number the object I want to remove is. How do I identify which object to remove and then remove that object?
Best Answer
-
Hi Samuel,
I think you'll need to find the index of the object to remove. You might be able to do this with a child workflow that evaluates each array entry and stores values to keep track of runs and indices. Once you've found the index and are ready to use "Delete from Array", add a 1 to it since "Delete from Array" starts at index 1 instead of 0.
We understand this process is currently complex, so we're looking at better ways to have users find their object indices moving forward.
Hope this helps!
Answers
-
Hi Samuel,
I think you'll need to find the index of the object to remove. You might be able to do this with a child workflow that evaluates each array entry and stores values to keep track of runs and indices. Once you've found the index and are ready to use "Delete from Array", add a 1 to it since "Delete from Array" starts at index 1 instead of 0.
We understand this process is currently complex, so we're looking at better ways to have users find their object indices moving forward.
Hope this helps!
-
Thank you, this is the solution I landed on, was curious if there was another (easier) way.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives