Sep 23, 2024 01:48 PM
Hello,
I have 2 tables, clients and tasks. Each task has a linked record field to the client. I want the automation structured so that when Task ABC is Complete, the linked client's stage (stage is a field in the clients table) updates. I am struggling getting the record ID for the linked client record for the subsequent steps.
Sep 23, 2024 06:52 PM
Hi,
Suppose you are set automation trigger for Tasks table 'when record match condition' (Status=Complete)
The simple and a bit risky and not 100% correct way is to add Update step
and put a value of trigger record link field into [Record ID ] (to update)
Each link has Name (displayed on it) and ID (of a record linked in other table)
So you need to switch which value to pass and set ID instead of Name
Then in Fieds (to update) select Stage and choose .
Example - I set 'When Task is Done', set Stage to Stage 3
(note: i added lookup of task Status from Tasks table. Sometimes Stage can be set with formula, using such lookup, so you don't need automations for that
Of course formula is not so 'bright' as Single-Select. But you can add color emojis with Win+.(dot) ✔⚠❓😃
But that's another story.
Problem of such method - Record ID expects single ID. So, if you have 2 Clients linked, it will fail
Indeed, linked field able to hold the array of links. Putting array into a place for a single value is not good. Even if now this array has exactly 1 member.
Second method: use Find Records to find all Clients linked to your trigger record. Result can be limited to a number of records, so you can set limit to 1 and be sure that only a single ID will be returned.
Third method is closest to actual workflow - take array of IDs right from trigger record value of 'Link to Clients'
(now it's only 1 link, but if there were 10, it would work as well) and use as a list in Repeating Group
Inside Repeating Group install Update step for Stage.
Again, don't forget to choose ID property
I linked the Task X to three Clients, set Task to Done and all three were promoted to Stage 3