Hello, just asking if its posible to get the list in here using automations? for instance if i have like 3 items that are link to here. can i get it via automations api?
Hi @meetmaykel
The simple answer is yes, (I am fairly sure you mean in a Workflow Automation and not an external API call which is also possible). If i have a record βJimβ that is related to two records βOneβ and βTwoβ the list looks like:
In the Automation we can get a collection of the related records with the
Get related records
block this can be set to get the details of the related records in either direction.
As you can see from the first script block you can access all the related record fields now you have βcollectedβ them however this may not give you what you want as it will only provide you with the first record to get access to all of them you need to loop through each record in the collection and take and action on each. In my example I have added each record name to a variable and then in the last block (outside of the loop) I have loged the contents which you can see on the right now contains both names seperated with a ', β
If you wanted a list of names you could add a line break instead of the comma:
Now when you build a collection in Tape this can be a Search or Related then you also get given a variable which is named record_collection_the_app_name
and that is a JSON of all the records with all there details, if you look here then you can see mine and the top part of what your get:
This requires a little more code but you could for example extract all the related record names with one JSONata line rather than looping through each.:
Hopefully that all makes sense
@Jason thank you for your response as always. yes, assuming its related to one app only, but what about if i have let say 10 different apps that will be link to the main app depending on the use. shoud i get related each of those apps? or maybe there is a dynamic way that i can just check what are the apps that are related to that item