Execute a function across multiple records using the Bulk Action component. Bind the Bulk Action component to a Table or enable CSV/TSV file uploads. The Bulk Action component can provide an easy way for users to update or insert new data records en masse.
Turn on multi-select for a table component, and allow users to select table rows to update all of the records instantaneously.
If you have a file with updated data for a number of existing records, you can use bulk acton to update all of the records instantaneously.
Create a series of new records by uploading a CSV with the required data.
First, choose the function that you want the Bulk Action to execute.
Next, configure the source for this bulk action. Select File Upload if you want the user to upload a CSV or TSV file to complete the bulk action. Select the Binding option if you plan to have users select multiple rows of a table to complete the bulk action.
If you selected Binding, you'll also need to specify the Table component you'll plan to use with the bulk action and whether to use selected rows only or all rows. Choose Selected Rows to only execute against the rows the user selects, or choose All Rows to executed the Bulk Action for all rows in the table.
Then, give your component a name (used to reference this bulk action element within Internal). You can also customize the button text and add an optional icon.
Next, you'll set up the fields for this bulk action. To do this, you’ll click the "+" to add fields, and then specify what values go in them.
You can create visibility rules that will determine when this component is visible and able to be interacted with.
Usually, if your import changes some data that is displayed in the Space, you'll want to refresh the data. On Submit options allow you to refresh the data of any component in the Space.
Here you can see design attributes and set how overflow content is displayed.
Left and Top options only appear for top-level components (components that are placed directly onto the Space canvas).
Left: Set the distance of this component from the left edge of the Space canvas (x-axis position). This can be expressed as a % of the canvas or as a number of pixels.
Top: Set the distance of this component from the top edge of the Space canvas (y-axis position). This can be expressed as a % of the canvas or as a number of pixels.
Width: Set the width of this component as a number of pixels or as a % of the containing unit.
Height: Set the height of this component as a number of pixels or as a % of the containing unit.
If the component is a top-level component, the containing unit is the Space canvas.
If the component is in-line within another component, the containing unit is the parent component.
If the component is within a flexbox component, the containing unit is the flexbox.
Snap to Grid: Set the edges of this component to snap to the grid canvas in the Space.
Once you’re done configuring your component, you can save and publish your Space so it can be used.
When a user clicks on the bulk action button, they’ll be prompted to upload the file containing the data if you configured the component as a File Upload. If you configured it to use a binding, the user will first need to select rows in the corresponding table before clicking the button.
Once you upload your file, you’ll be able to map the columns in your field to the fields in your data, using the dropdown selection at the top of each column. Unmapped columns will not have their data imported. If you're using bindings, the user will skip this step.
Next, you’ll review what your data looks like before importing it. Internal will alert you if there are any potential errors, such as data that doesn’t match the field’s filetype. For these types of errors, you may still proceed to import the data, although it may fail.
You may also see blocking errors that must be resolved before you can import. For example, if you have an updated_at column that is required, if your file has any rows where this column is blank, you won’t be able to proceed to import.
Once you’re ready, hit the “Submit” button.