Save File
Saves text, JSON or a CSV table to Files.
Category: Device · Takes time: the next step waits for it
#When to use it
Use it to export data to the Files app: a CSV of expenses for a spreadsheet, a JSON backup, a text note.
#Example
An Export button: Save File with Content: ⚡︎ → expenses, Name: Expenses, Type: Csv.
#Good to know
- Files opens so the person picks where the file goes.
- A list of records saved as CSV becomes a table: a column per field, in alphabetical order, and a row per record.
- An empty Name saves as Export. Issues flags a name with any of
/ \ : * ? " < > |in it. - Closing Files without saving doesn't stop the run; the debugger notes it.
#Add it
Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Save File (under Device). Tap the step to open its settings.
#Settings
| Setting | What it does | Kind | Default |
|---|---|---|---|
| Content | What to save. A list of objects saved as csv becomes a table. | Any value | Required |
| Name | The file name, without the extension. | Text | Required |
| Type | The format. | Choice: Text, Json, Csv | text |