Text to Choice

Matches text to choices you create.

Text to Choice

The Text to Choice feature takes a text input and analyzes it to make a choice between options that you create. For example, you can analyze sentiment of text into positive, negative, or neutral.

Adding the Text to Choice feature

In the Data Editor

  1. Open the table where you want to use the Text to Choice column.

  2. 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.

  3. Add a Text to Choice column to store the result. Search for “Text to Choice” or navigate to AI → Text to Choice.

  4. For Instructions, enter custom text to create more specificity for your prompt.

  5. For Input, use the Input column created previously.

  6. For Choices, enter the choices you'd like to use as a comma-separated list. Note that the choices cannot be an array.

  7. Note: If the action will be triggered in the Workflow Editor, then add a basic text Result column where the result will be stored.

  8. Click on Done.

In the Layout Editor

  1. If you have not yet set up the columns you'll need in the Data Editor, start with the steps above.

  2. Add a component that supports actions such as Button, Hint, or Rich Text. Bind this component with the column where the output is stored.

  3. In the configuration panel on the right, in the Actions menu, select the Text to Choice action.

  4. Name the action and choose an icon.

  5. For Instructions, enter custom text to create more specificity for your prompt.

  6. For Input, choose the column where the text to be analyzed is stored, or enter custom text.

  7. For Choices, enter the choices as a comma-separated list, or choose the column where you've put the possible choices.

  8. For Results, select the column where the results should be stored.

  9. 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.

  10. To enable users to adjust the instructions, add a Text Entry Component pointing to an Instructions column with the adjustments you want made.

  11. 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

  1. If you have not yet set up the columns you'll need in the Data Editor, start with the steps above.

  2. Select the (+) plus symbol or the + New Workflow button.

  3. Select the data source of the screen where the action is triggered.

  4. Add Text to Choice as the first step of the workflow.

  5. For Instructions, enter custom text to create more specificity for your prompt.

  6. For Input, choose the column where the text to be analyzed is stored, or enter custom text.

  7. For Choices, enter the choices as a comma-separated list, or choose the column where you've put the possible choices.

  8. For Results, select the column where the results should be stored.

  9. Optionally, add a Show Notification action at the end of the workflow to notify the user.

Frequently Asked Questions

Have a question about Text to Choice? Ask the Glide community.
Need more help? Hire an Expert.

Updated more than a week ago
Was this article helpful?

On this page