Get object by value out of a variable in UI Builder

Hi, I have a group of objects that have been placed in a variable via the “load table objects” block. Now further down my logic I am in need of using the same data again but this time getting a specific object out of it based on an objectId. What blocks should I be using so I don’t have to query the db again? I know it’s something simple, but all my methods seem convoluted…

Thank you,
Roger

The simplest approach would be to create a custom function that iterates over the already retrieved collection and returns the object that matches the condition (in your example it is the object that has the required objectId).

Regards,
Mark

Thank you Mark,
It was of course much simpler than I thought. I was looking for a special block, and then got stymied by all of the iterative blocks saying list, not object, so proceeded to try to convert objects to lists, not sure why…

For anyone else in the same boat, this way works well:
findObjectByKey

Give it a group of objects that you want to look through, and the key and value pair for the object you want to isolate. You may want to return an error if it can’t find what you want as well.