I’m using the UI integration builder and I want to do the following:
I have a trigger that fetches a list of objects similar to this one:
I’m using the trigger to power an action’s dynamic drop down menu. However, I can only use exactly one of these attributes to be accessible as an inputField in the action’s POST request.
My question is - Can I somehow access these other object properties I fetched in the dynamic dropdown in the following POST request?
If I can, what is the best way to do that?
Best answer by GetUWiredView original
If you are just using the form builder, then no but if you switch the form to code mode or convert the project to the CLI you can do it either of these ways:
If your api supports retrieving an object by its id then once a user selects an option and you have the object id, you can make another request before your main one that retrieves the full details of that object.
Alternatively, you could JSON.stringify each of the objects and set the string as a new value in the object before returning the results.
Then you can use the new key ‘stringObject’ as the value you want from the dynamic dropdown
then you can JSON.parse the value selected to get it back into its proper form and from there pick off what you need.
Thanks for the quick reply!
So if I understand it correctly, I should first fetch say UUID using the Dynamic Dropdown and then use the UUID to make another call to our API that retrieves the rest of the information?
Should I use the Dynamic Field for this second call?
If you go the second call route, you would not use an additional field. The second request would happen behind the scenes prior to your main request.
I have also edited my initial response as I thought of a second solution that didn’t use a second api call.
I’ll definitely check it out, thanks again!