Prompt for Data and Importing CSV Files
Prompt for Data
The Choice Entry dialog now contains a third option when choosing how to populate the data of a multi-column list box. The Choice Entry screen can be accessed from Form Design > Properties > Choices by selecting the ellipses from within the Choices field, or by double clicking on an object within the form. The new third option, Prompt for data, allows a DataBlock Designer to request a .csv file be uploaded by a DataBlock runner the next time the DataBlock is run. This is useful for supplementing a query with information found outside of a typical database.
Here, DataBlock Designers may define the fields displayed in the multi-column list box based on a CSV file imported by the end user executing the dashboard.
Under Expected fields, column headers can be added, deleted, or edited via the Add, Delete, and Edit buttons. Likewise, Designers can simply upload their own .csv file via the Upload from file button to auto-fill the expected header fields.
Under Additional options, a custom message may also be included. This custom message will display along with the request for data when the DataBlock is next run.
Selecting Add or Edit brings up the Column Properties menu, where more options may be configured.
- CSV Column Header Name - the name of the column header.
- Required - check this box to mark this header as a required field in the CSV upload.
- Name - the Argos variable name.
- Display Caption - the name as it will be displayed when the DataBlock is run. If this field is left blank, it will default to the variable name.
- Column Description - a brief description of the data within the column.
- Format - allows you to apply a format mask on a numeric or date field. For example, you can change the way the date is displayed or adding dollar signs and decimals.
- Conditional Formatting - used to add emphasis or context to the text or cells within a list box. For more information see the conditional formatting page.
- Visible - sets the visibility of the column header.
- Width - set the fixed width of the column header.
- Alignment - specify left, right, or center alignment within the cell.
Finally, you'll be able to preview the columns and make any further adjustments.
When the DataBlock is run, the DataBlock runner will receive the following:
Missing Required Fields
When a CSV header is marked as required by the DataBlock Designer, but is missing from the prompted user's upload, the following message is produced:
This message informs the DataBlock runner which fields are marked as required (field names preceded by an asterisk), as well as which fields are missing from their upload (field names enclosed in parentheses).
Import From File
Fields within a multi-column list boxes may also be populated via the Import From File button. This option appears on the Choice Entry screen when selecting Manual entries when editing a multi-column list box.