Help

Re: Error on updating a linked record per script

Solved
Jump to Solution
661 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Christian_L
6 - Interface Innovator
6 - Interface Innovator

HI, 

I have the following problem - pls see also the screenshot enclosed for deeper explanation.

  • I set per script a link in a multi-link enabled cell/coloumn. This works fine:
    await table_tacs.updateRecordAsync(per_positive_tac, {[nameReplacedBy]: [{id: newrecord_miete}]});
  •  
    I then want to add in the same cell a second link, i.e. attach a second link. I try to do this with this command:
    await table_tacs.updateRecordAsync(per_positive_tac, {[nameReplacedBy]: [per_positive_tac.getCellValue(nameReplacedBy),{id: newrecord_BK }]});
  • But this throws an error (see screenshot) - I tried various ways, but none works; Any help from the community? If there is a better way to get the topic solved - also fine: the objective is just to
    • set the 2 links to "newrecord_miete" and to "newrecord_BK " in one cell, which is column "nameReplacedBy" of the record "per_positive_tac"

Thank you!, Chris

 

 

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

There is a problem with the use of updateRecordAsync.
updateRecordAsync is an asynchronous process, and executing it in succession like this will not reflect the changes immediately.
All fields need to be updated in a single updateRecordAsync run.

await table_tacs.updateRecordAsync(per_positive_tac, {
  [nameCheckedtoSplit]: 1,
  [nameReplacedBy]: [{id: newrecord_miete},{id: newrecord_BK}]
})

 

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

There is a problem with the use of updateRecordAsync.
updateRecordAsync is an asynchronous process, and executing it in succession like this will not reflect the changes immediately.
All fields need to be updated in a single updateRecordAsync run.

await table_tacs.updateRecordAsync(per_positive_tac, {
  [nameCheckedtoSplit]: 1,
  [nameReplacedBy]: [{id: newrecord_miete},{id: newrecord_BK}]
})

 

Dear @Sho : wow, perfect, thank you! So I had 2 mistakes; not reflecting the asynchronity and writing an error in the code when updating with more than 1 link (which I tried before..). Thank you so much for the fast and helpful response! br Chris