Creating parameters

A parameter is a container or a placeholder such as a number, date, or string that can replace a constant value or a list of values. Create Worksheet parameters to optimize your data inquiries. Use parameters to run different scenarios with adjustable values, without creating or modifying the constants in formulas for each new value.

Parameters are useful for 'what-if' analysis, financial planning, cohort analysis, and so on. When you create parameters for your Worksheet, you guide users in their exploration of the data as they search on your Worksheet.

Beta

This feature is in Beta and off by default. To enable it, contact ThoughtSpot Support. For more about Beta features, see ThoughtSpot Cloud release life cycle.

Creating parameters

There is no maximum number of parameters you can create for a single Worksheet. However, parameters don’t work across Worksheets. They only affect a single Worksheet.

To create a parameter, follow these steps:

  1. Navigate to the Worksheet to which you would like to add a parameter.

  2. Select Edit Worksheet in the upper right corner.

  3. In the Data panel on the left of your screen, select the + button that appears when you hover over the Parameters section.

    Select the + button to add a parameter

  4. The Create parameter dialog appears:

    Create parameter dialog
  5. In the Parameter name text box, enter a name for your parameter. This name should be unique for the Worksheet and easy for users to understand.

  6. Optionally, enter a description for the parameter in the Add a description text box. Use this field to add additional information users might need before using this parameter in their analysis. It is a best practice to use this field to specify the formulas this parameter is used in, in addition to any other information you add.

  7. Under Data settings, specify the data type the parameter must be: Integer, Double, String, Boolean, or Date. For more information about data types, refer to Data types.

  8. For integer, double, or date data types, specify the allowed values: Any, List, or Range. For the string data type, specify either Any or List.

    Any

    Allows any value within the data type’s constraints.

    List

    Allows values only in the list you create. Enter a value in the Enter value…​ text box, and optionally enter what the value should display as in the Display as…​ text box. To add more values, select + Add row. To delete values, select the x to the right of the row the value is in.

    Create a list of allowed values
    Range

    Allows values only within the range you specify. In the Minimum value and Maximum value text boxes, specify the values the range begins and ends with.

    Create a range of allowed values
  9. For the boolean data type, optionally set custom names for true and false; for example, 0 and 1.

  10. Set the default value for your parameter. In the default value text box, enter the value this parameter should default to. For the boolean data type, the Default value option is a dropdown. true and false are the only options.

  11. Select Save.

  12. Save your Worksheet. Select Save in the upper right corner.

Editing and deleting parameters

To edit or delete existing parameters, follow these steps.

You can only edit or delete parameters that are not in use in any formula, Answer, or Liveboard. If a parameter is in use in any objects, you must first remove the parameter from these dependents, then delete the parameter.
  1. Navigate to the Worksheet with the parameter you would like to edit or delete.

  2. Select Edit Worksheet in the upper right corner.

  3. In the Data panel on the left of your screen, select the Down arrow to the right of the Parameters section. This expands the list of parameters.

  4. To edit a parameter, select the edit icon edit icon image to the right of the parameter name.

    Note that you may not be able to edit all fields, if the parameter is in use in formulas, Answers or Liveboards. You must first remove it from these Answers and Liveboards. To see which Answers and Liveboards use the Parameter, select View Details in the Edit parameter dialog that appears.

  5. Make your changes, and select Save.

  6. To delete a parameter, select the delete icon Delete icon image to the left of the parameter name.

    Note that you may not be able to delete the parameter, if the parameter is in use in Answers or Liveboards. You must first remove it from these Answers and Liveboards. To see which Answers and Liveboards use the Parameter, select View Details in the Delete this parameter dialog that appears.

  7. Select Delete in the dialog that appears.

  8. Save your Worksheet. Select Save in the upper right corner.

Using parameters

After you create parameters for your data, use them to run different scenarios when searching on your data or viewing Liveboards or Answers. To learn how to use parameters, see Using parameters.