File Picker

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

This task picks one or more files from the end user’s device and then stores them in a configured location. When you configure the File Picker task, you also configure a file storage location. After the File Picker task picks the file from the user’s device, it stores it in the configured location.

If you want to upload the file on DMS (Document Management System), you need to apply the Upload Media task after the File Picker task in the Task Groups module. While configuring the File Picker task, you can store the file in a specific location defined by file path or on DMS.

Steps to Configure

  1. On the <<task group’s name>> page, find the Task panel.
  2. In the Task panel, search and find the File Picker task.
  3. Drag the File Picker task from the Task panel to the Execution panel.
  4. Under File Picker, a group of boxes comes into view.
  5. In boxes, configure related properties as follows:
Property
Name
DescriptionMandatory
Reference NameThe reference name specifies the name of the task. In the Reference Name box, enter a name of the task. The reference name works as a name identifier, and you can use it to search and find the current task from the list of multiple tasks.Yes
AreaFile Info
Property Name DescriptionMandatory
Base 64After you click this check box, you activate the File Picker task so that it picks the file with the base64 format.No
File TypeWhen you click this list, it displays the following options:
a. Any File Type:- If you select this option, the File Picker can pick the file of all formats.

b. Custom File Type:- If you select this option, it allows you to select one or more file formats from the list of available formats.

You can select the file format as follows:
1. Click the Custom File Type check box to display the Custom File Type box.
2. In the Custom File Type box, click the application tree icon () to display the Custom File Type panel.
3. In the Custom File Type panel, under Select File Types, see and find the file type (for example, MP3, DOC, PPT) that you want to select.
4. After you find a file type, click the related right check box to select it.
5. Repeat step 4 to select other file types.
6. After you select one or more file types, click Select to define the types (formats) of files that the File Picker task can pick from the user’s device.

c. Image:- If you select this option, the File Picker task picks all formats of image files, excluding text-based and other audio and video files.
Yes
Allow MultipleThis group of tabs contains the following tabs:
i. Yes:- When you click Yes tab, it enables the File Picker task to pick multiple files at a specific time.

ii. No:- When you click the No tab, the File Picker task can pick only a single file at a specific time.
No
Max File Size (KB)In this box, enter a numeric value (for example, 1220) in kilobyte (KB) format. This value specifies the maximum size of a file in KBs (kilobytes) that the File Picker task can pick from the user’s device.No
File PathThis property allows you to define a location where the File Picker task stores the file after it picks the file from the user’s device. You can choose one of the following locations after you click in the File Path box:

a. Attribute:- Click this tab to select an attribute. After the File Picker task picks a file from the user’s device, it stores it in the selected attribute.

In the data modeler module, create an entity and then create an attribute in the entity.

To know more about how to create an entity or attribute, click here.

b. Element:- Click this tab to select an element. After the File Picker task picks the file from the user’s device, it stores it in the element.

c. Entity:- Click this tab to select an entity. After the File Picker task picks the file from the user’s device, it stores it in the entity.

In this case, you need to create an empty entity in the data model. At runtime, when the File Picker task picks the file from the user’s device, the entity dynamically creates an attribute so that the File Picker task stores the file in the attribute.
Yes
Reload ElementUse this property when you select an element’s reference name in the File Path task. This property allows you to define the element that the application will upload after the File Picker task picks the file from the user’s device.No
AreaDMS (Document Management System)
Property Name DescriptionMandatory
Doc IDIn this box, define a unique identifier (for example, file_image_01, file_all_format). This unique identifier serves as the Doc ID. This Doc ID is used to manage the file on DMS (Document Management System).

Later, application fetches the file based on the unique Doc ID. You can define the Doc ID as follows:

a. STATIC function:- Use the STATIC function and then manually define the Doc ID in the STATIC function.

b. Attribute:- Create an entity in the Data Modeler module. Thus, define an attribute in the entity. Define a unique Doc ID (an alphabetic, an alphanumeric, or a numeric value) as the value of the attribute.

To know more about how to create an entity or attribute, click here.

Click in the Doc ID box, enter the attribute’s name, and then select it.

c. Element:- Select an element that contains the Doc ID.

d. Entity:- Create an entity in the Data Modeler module. After you create the entity, store the Doc ID in the entity by using Copy Data task or by other methods.

When the application executes Copy Data task, it dynamically creates an attribute to store the Doc ID in the entity.

In the Doc ID box, enter the entity’s name, and then select it.

e. Functions:- You can use the vDesigner function, such as the STATIC function or other functions, to store the value of the Doc ID identifier.
Yes
Doc Bundle IDIn this box, define a key. This key is referred to as the Doc Bundle ID. The Doc Bundle ID groups multiple documents to manage them on the Document Management Server.

You can define the doc bundle ID by using the following ways:
a. Static Function
b. Attribute
c. Element
d. Entity
e. Function


To know more about how to define the Doc Bundle ID, see the description of the Doc ID property in this table.
Primary Key1In this box, define a unique key that is called the Primary Identification Key. The File Picker task uses the primary key1 as a unique identifier when it uploads a file to the document management system. On the basis of the primary key, it manages a file or a group of files on DMS.

To know more about how to define Primary Key1, see the description of the Doc ID property in this table.
No
Primary Key2Read the description of Primary Key1.No
Primary Key3Read the description of Primary Key1.No
Business RuleIn this box, you can configure a business rule to determine the execution of the File Picker task.  If the user’s action satisfies the condition in the business rule, the File Picker task is executed.

To configure the business rule:
–> In the Business Rule box, click the application tree icon (), and the Business Rule panel opens.
–> In the Business Rule panel, click Create New to configure a new business rule.
  1. After you configure the related properties, click Save to configure the File Picker task.
Was this article helpful?
YesNo