Dec 28, 2023 01:42 AM
Hi all!
Maybe someone has solved a similar problem.
I'm making a kind of task tracker, but I can't solve the following problem.
If a task (record) is created with several responsible people, I need the automation to work and split one record for each responsible person separately, that is, for 1 record to have 1 responsible person, but initially the ability to create a record for several people remains.
The resulting flow is as follows:
1) A record is created through an interface with several responsible persons
2) Automation creates similar records by alternately assigning one responsible person to each record until the number of responsible persons ends
3) The first task created through the interface is either deleted or the first responsible person is assigned to it
How can such a problem be solved?
Dec 28, 2023 12:56 PM
Hey! What type of field is the user selection? (Linked Record? Multiple Select?) If it's a linked record, you can use the Repeating Action feature within Automations to create a new record for each of the linked records.
Dec 29, 2023 04:31 AM
Hey Marcus!
yes, this is a linked record
That is, I need to create repeating logic that will select each one of the selected ones?
Dec 30, 2023 02:54 PM
Hi,
I think, action with deleting will be easier.
Choose right trigger, maybe 'when record matches condition' - 'when responsible person contains comma'.
Use automation repeating group to loop through list and create record for each list item
add script step after the loop, with a record id value in left side, call it, for example record_id
let {record_id} = input.config();
let table=base.getTable('XYZ')
await table.deleteRecordAsync(record_id)
or you can use oneliner
await base.getTable('XYZ').deleteRecordAsync(input.config().record_id)
Dec 30, 2023 10:44 PM
I agree with this if scripting is available on @flavich's plan.
Jan 09, 2024 03:01 AM
Hello!
I started trying your method, most of the automation was set up
Now I'm faced with the fact that in testing the trigger does not see a comma in the list of responsible persons
Tried this trigger - 'when record matches condition' - 'when responsible person contains comma'
I also tried to convert the field to text, but it didn't help, the comma is not recognized
What ways to solve the problem are there?
Jan 09, 2024 03:43 PM
I didn't know your field type. If you use linked records, just add formula field with the name of linked field and use it in trigger.
I tried on test table and it works.