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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives