Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Create record from the Multiselect Lookup

Solved
Jump to Solution
223 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Previously I’m using multiselect field from the current table. However, I am trying to automate by pulling the multiselect field from the LOOKUP. But when I want to run the script, I am unable to do so.

image

Here is the structure of the base

image

My current script

let templateName = r.getCellValue(s.tempField.name);
console.log(templateName)

let monthName = r.getCellValue(s.monthField.name);


templateName.forEach(item => console.log(`${monthName}; ${item.name}`));

let combinedArray = templateName.map(item => `${monthName}; ${item.name}`);

console.log(combinedArray);
output.table(combinedArray);

How to modify this script? Thanks!

1 Solution

Accepted Solutions

Hi,
try to add .join().split(',')
right after getCellValue(fname)
i’m not sure it’s correct for all types of lookup, but it should work in your case

note that if your values contain comma, you should define another divider, also providing join() with it

See Solution in Thread

2 Replies 2

Hi,
try to add .join().split(',')
right after getCellValue(fname)
i’m not sure it’s correct for all types of lookup, but it should work in your case

note that if your values contain comma, you should define another divider, also providing join() with it

You’re a lifesaver! Thanks a lot mate!