- Getting started
- Setup and configuration
- Using Data Service
- Reference
- Examples & Tutorials
- Using Entities in Projects
- Uploading File Fields in Entity Records
- Downloading File Fields in Entity Records
- Uploading Data From CSV Using Batch Activities
Uploading File Fields in Entity Records
Using Studio you can easily manipulate specific files of an entity record. These activities allow you to execute operations such as upload, download, or delete specified files of a specified field of an entity record.
The maximum size of a single file cannot exceed 10 MB, otherwise unexpected behavior might occur.
The following example contains a main XAML demonstrating how to upload a file to Data Service, after downloading it from Olympics games related Wikipedia pages.
Following the steps detailed on the Creating an Entity page, we created an entity for storing information about the Olympic games.
The Olympics entity has the following fields: Name (text) and Logo (file).
Import the entity inside your workflow in Studio.
The following workflow scrapes information and images about a certain Olympics edition, maps the found data to arguments, and passes them along to the main workflow.
name
variable. This goes through all records from the Name field and outputs them in the existingRecords
variable to be used in the following If activity.
existingRecords
variable is 0 or not:
1. If a record does not exist, create it and assign values to it
existingRecords=0
condition is met, create a new Sequence, use the Multiple Assign activity to assign values to the olympics
and olympics.Name
variables and the Create Entity Record activity to add the collected information to Data Service.
You can use the information available in the Using Entities in Projects page Create Data Records section example.
2. If a record already exists, assign values to it
existingRecords=0
condition is not met, use the Assign or Multiple Assign activity to assign the value to the existingRecords
variable.
We use the Upload File to Record Field activity and upload the created file to the Logo field from the Olympics entity record.
Remove the file that was downloaded locally from Wikipedia to our machine after uploading it to Data Service by using the Delete activity.
olympics.Name
, to the Output panel.
Once finished, your project should look like this: