- 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

Data Service Automation Suite User Guide
Downloading File Fields in Entity Records
linkUsing 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 following example demonstrates how to automatically download from Data Service a specified file containing information from the Olympics games extracted from Wikipedia pages in order to use it for other operations.
Prerequisite: Create Entities in Data Service
linkFollowing 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).
Check out the following pages:
- the Upload File activity as it contains details about how to use this activity to easily upload the logos;
-
the File page as it provides details on how to upload logos from the platform.
Note: System built-in fields are automatically added to your entity in order to provide details about its creation.
Step 1: Build the Workflow
linkQuery Related Records
folder
variable. This goes through all records from the Name field and outputs them in the olympicsRecords
variable to be used in the following Input Dialog activity.
Create an Input Dialog Box
Select
label message and a Multiple choice
Input Type. In the Input array add the olympicsRecords
variable created previously for the Query Entity Records activity for which you'll apply the following function: olympicsRecords.Select(Function (o as Olympics) o.Name).ToArray
to set up the array of options to choose from.
selectedOlympics
variable to gather the output results.
Assign a Value to the File
olympicsRecords.First(Function (o as Olympics) o.Name = selectedOlympics)
variable created previously in the Input Dialogue activity to the new olympicEdition
variable.
Set up a Select Folder Dialogue Box
folder
variable for the output folder path. You'll use this variable in the following Download File from Record Field activity.
Download File From Record Field
folder
file from the Logo file of the olympicEdition.Id
entity record.
Set up a Power Shell Command
Path.Combine(folder, olympicEdition.Logo.Name)
in order to combine the following input parameters: folder
and olympicEdition
variables and the Logo and Name fields created within the Olympics entity.
The purpose of this activity is to invoke the full path of the file and open it in the default photo viewer or editor.
[Optional] Comment Out
As an optional step, we've added an example of how to perform a file deletion which has been commented out to not delete the file at runtime. To do this we added the Comment Out activity. Here we included the following activities that won't be executed at runtime:
Please note that you can uncomment it to try it out.
- Set up the child activities order.
We added a Sequence activity that we've renamed Ignored Activities.
- Here include the Delete File from Record Field activity to remove the file from the specified entity record field.
- For the Delete File from Record Field activity to work as expected set it up as follows:
- Set the Record ID to the
olympicEdition.Id
variable created within the Download File from Record Field activity. - The Field from where you want to delete the file is the Logo file created in Data Service record created at the beginning of this example.
- The Output Record is the
olympicEdition
variable created within the Assign activity.
- Set the Record ID to the
Once finished, your project should look like this: