
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 14, 2020 05:20 AM
Hi all! I’m still pretty new to scripting, but came across a problem that feels like it should have an obvious answer.
I would like a user to be able to update a number field in my base via some inputs in the script, however the input.textAsync function throws an error because the string can’t be assigned to that field type.
Aside from changing my field to a string, is there away to change the input type to a number in the scripting block?
Thanks!
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 14, 2020 08:08 AM
Wrap Number()
around your string variable to convert it to a number:
...
table.updateRecordAsync(record, {
'Respeaking Score': Number(score),
...
More info about JavaScript type conversion can be found here:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 14, 2020 08:08 AM
Wrap Number()
around your string variable to convert it to a number:
...
table.updateRecordAsync(record, {
'Respeaking Score': Number(score),
...
More info about JavaScript type conversion can be found here:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 14, 2020 03:00 PM
Amazing, thank you!
I was hoping there would be an easy fix! So much to learn.
