Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jan 11, 2023 08:42 PM
This is basically a leave tracker.
Table 1: Employee Details
Table 2: Leave Requests
I've created an automation that does the following:
I keep getting the below error no matter what I try to tweak:
I am not very familiar with scripting. I've seen replies from @JonathanBowen and @kuovonne but I need more background in scripting to understand.
Is there no way to automatically update a linked field?
Solved! Go to Solution.
Jan 18, 2023 12:02 AM - edited Jan 18, 2023 12:04 AM
@aleajewelle What you could try to do instead is to do it the other way around.
- Now: you're updating the linked fields in the Employee Details Table
- You could try: instead, you could update the record from the Leave Requests table (the one that was just created), because the latter only needs one linked field. So in the step "Update record", you pick the table Leave Requests (instead of employees table), enter the Record ID from the first step/trigger, and add the employee record ID found in the second step "find records" (from the Employee's table) into the field that is linked with the Employees table, I don't know the field name.
That might be easier!
Jan 16, 2023 04:50 AM
Hi @aleajewelle ,
I hope I can help you out. It seems like you got mixed up in your last step.
You want to update the employee's record. That's why you picked the Employee's table. That means that in the previous step, you look for a record from this table. Therefore, in the field "Record ID", you need to enter the record ID found in the previous step (Find records) and not the record ID from the request. That's why you get the error message that the record doesn't exist.
Then, in order not to overwrite the requests with the new request made, you need to combine the requests found in the "Find Records" step, and combine it with the newly created request. I believe you can do that by entering the found records, adding a "," and finally adding the Record ID from the trigger step.
Hope this helps!
Jan 16, 2023 12:05 PM
@Marielle_Gueis1 , thank you for taking the time to answer my query.
I was able to make this work by following your suggestion. However, I am not sure how to do the last part to not overwrite existing records. Currently, It is getting overwritten. I've tried adding , and "," before and after the Leave Application # but it gets an error if I try.
Jan 18, 2023 12:02 AM - edited Jan 18, 2023 12:04 AM
@aleajewelle What you could try to do instead is to do it the other way around.
- Now: you're updating the linked fields in the Employee Details Table
- You could try: instead, you could update the record from the Leave Requests table (the one that was just created), because the latter only needs one linked field. So in the step "Update record", you pick the table Leave Requests (instead of employees table), enter the Record ID from the first step/trigger, and add the employee record ID found in the second step "find records" (from the Employee's table) into the field that is linked with the Employees table, I don't know the field name.
That might be easier!
Jan 24, 2023 11:08 AM
@Marielle_Gueis1 I had a hard time figuring this out. Reversing the steps is easier said than done. I need more practice but your recommendation did make more sense after rereading it a million times! lol
Again, thank you! 😍