The Text to Number feature transforms a text input into a numerical output. It can convert emojis, basic math logic, phrases, and a variety of languages. It can also take instructions about your data and apply them to existing text, returning a number result.
Math in Text Columns
Large language models (LLMs) are generally not good at doing math when the input is pure text. Consider specifying in the instructions to “Do the given math equation.”
Open the table where you want to use the Text to Number column.
Add a new basic text column for the Input. The input can be any column that contains text, so if you’ve used another action or computed column to create a text result, you can also use that text result as the Input source.
New columns added with the plus button will always appear on the right. If you'd like to add a column somewhere else in your data, you can select the dropdown menu on an existing column and choose Add column right. You can also click and drag columns to rearrange them.
Add a Text to Number column to store the result. Search for “Text to Number” or navigate to AI → Text to Number.
For Instructions, enter custom text to create more specificity for your prompt.
For Input , use the Input column created previously.
Adjust the display configurations for precision, group separator, and units if needed.
Note: If the action will be triggered in the Workflow Editor, then add a basic number Result column where the result will be stored.
Click on Done.
In the Layout Editor
Add a component that supports actions such as Button, Hint, or Rich Text. Bind this component with the column where the output is stored.
In the configuration panel on the right, in the Actions menu, select the Text to Number action.
Name the action and choose an icon.
For Instructions, enter custom text to create more specificity for your prompt.
For Input, choose the column where the text to be analyzed is stored, or enter custom text.
For Results, select the column where the results should be stored.
To display the text that results from the action, add a Text Component and use your results column as the source. This will instantly show the generated results to your users.
To enable users to adjust the instructions, add a Text Entry Component pointing to an Instructions column with the adjustments you want made.
To enable users to adjust the input, add a Text Entry Component pointing to the Input column to be able to change the input.
In the Workflow Editor
If you have not yet set up the columns you'll need in the Data Editor, start with the steps above.
Select the (+) plus symbol or the + New Workflow button.
Select the data source of the screen where the action will be triggered.
Add Text to Number as the first step of the workflow, or add it to an existing custom action flow.
For Instructions, enter custom text to create more specificity for your prompt.
For Input and Result, use the Input and Result columns created previously.
Optionally, add a Show Notification action at the end of the workflow to notify the user.