![Dennis_Petrou Dennis_Petrou](https://community.airtable.com/legacyfs/online/avatars/3X/a/1/a1e6e2ab18e01fbcc6b18153b0bfd7b6a01ff14c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 24, 2022 10:47 AM
Hello. Let me preface this by saying I am not great at scripts, so your patience and clear explanations would be greatly appreciated.
We currently have a script (no idea who wrote it ages ago) in one of our tables that works by the pressing of a button. I am trying to get the same script to work by triggering it with a checkbox so I can use it in an automation. Thinking I could just copy/past the script, but that clearly doesn’t work. I get the error :
TypeError: input.recordAsync is not a function
at main on line 2
I know I have to make some changes for it to work properly, I’ve seen similar responses but couldn’t figure out exactly what to do. The original working script that is currently triggered by a button is:
let mapperschedule = base.getTable("Mapper Schedule");
let record = await input.recordAsync('Pick a record', base.getTable('Mapper Schedule'));
let topaste = record.getCellValue('Update Mapper Schedule Name - To Paste');
let name = record.getCellValue('Name');
output.markdown(topaste);
if(topaste!=""){
await mapperschedule.updateRecordAsync(record.id,{
'Name': topaste
});
}
output.markdown('# Done!');
Any help would be greatly appreciated!
Solved! Go to Solution.
![Dennis_Petrou Dennis_Petrou](https://community.airtable.com/legacyfs/online/avatars/3X/a/1/a1e6e2ab18e01fbcc6b18153b0bfd7b6a01ff14c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 26, 2022 09:56 AM
thanks so much for all your help!
![](/skins/images/DD0CD7D0ACF200EF4456420D87029A3D/responsive_peak/images/icon_anonymous_message.png)
- « Previous
-
- 1
- 2
- Next »