Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Concatenated text field in automation

Solved
Jump to Solution
593 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Amy_Case
4 - Data Explorer
4 - Data Explorer

We needed a "quick" way to see that a calendar entry was canceled (in the label, which is a text field named "Short Name") without typing it. (We use a check box to "cancel" the event) 

Forgive me, I'm new. This may not be the most elegant way of doing this, and I may have missed something 

I built an automation that when the check box is modified, 

AND the value of the checkbox is checked (a FIND table with that conditional and the Airtable ID as the record output) 

THEN run a script to update the text field (because putting the text and the field was not working in the non-script format) 
I added input parameters of recordID (the airtable ID from the find field) 

and xText which is the existing text in the field "Short Name" 


the script looks like this: 

 

let table = base.getTable("Productions_calendar");
let config = input.config();
let recordID = config.recordID;
let xText = config.xText;
var c = "Canceled: ";
c += xText;
let query = await table.selectRecordsAsync({fields: []});   //I am not certain this is necessary?
let record = query.getRecord(recordID);

await table.updateRecordAsync(record, {"Short Name" : c, });


1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Just this would work fine:

 

let table = base.getTable("Productions_calendar");
let config = input.config();
let recordID = config.recordID;
let xText = config.xText;
let c = "Canceled: ";
c += xText;

await table.updateRecordAsync(recordID, {"Short Name" : c, });

 

You can also do this without a script by setting it up like so:

Screenshot 2024-04-26 at 8.51.56 AM.png
And I've set up both automations here



See Solution in Thread

2 Replies 2
TheTimeSavingCo
18 - Pluto
18 - Pluto

Just this would work fine:

 

let table = base.getTable("Productions_calendar");
let config = input.config();
let recordID = config.recordID;
let xText = config.xText;
let c = "Canceled: ";
c += xText;

await table.updateRecordAsync(recordID, {"Short Name" : c, });

 

You can also do this without a script by setting it up like so:

Screenshot 2024-04-26 at 8.51.56 AM.png
And I've set up both automations here



Thank you for the tip on the script! It's funny, the latter (no script) method you suggested didn't work for me. It threw errors and would not run. It was what I tried first.