Add or Modify Data Items in Bulk

Data Items in Questetra BPM Suite can be added one by one from the [Data Items] tab on the App editing screen. When there are many Data Items or when you want to use the same Data Items as another App, they can be added in bulk using a TSV file (tab-delimited text file). Data Items from an existing App can also be exported as a TSV file. The [Editable], [Display only], and [No display] permissions per Step can similarly be updated in bulk using a TSV file.

In this article, using the example of creating a Business Travel Expense Reimbursement App based on the Data Items of an active Expense Reimbursement App, we will explain exporting, bulk adding Data Items, and bulk updating editing permissions. Additionally, we will cover how to correct Data Types when an added Data Item has the wrong type, as well as how to handle unused Data Items in an active App. Adding Data Items individually and the meanings of [Editable], [Display only], and [No display] for each Step are explained in “Chapter 5: Creating an App Handled by Multiple Users” of the First-Time Workflow App Design guide.

Workflow App Used in This Article

The base is the Expense Reimbursement App used in “Configuring Value Checks and Initial Values for Data Items“. Steps progress in the order of “Application” (Start Step), “Approval”, and “Payment Processing”. There are seven Data Items: “Applicant”, “Date of Use”, “Amount”, “Receipt”, “Project Code”, “Scheduled Payment Date”, and “Transfer Date”.

The newly created Business Travel Expense Reimbursement App uses the same three Steps as the Expense Reimbursement App: “Application”, “Approval”, and “Payment Processing”. The following three Data Items are added to the seven Data Items from the Expense Reimbursement App:

Item NameData TypeField NameRequired
DestinationString (Single line)q_destinationYes
Departure DateDate (YMD)q_departure_dateYes
Return DateDate (YMD)q_return_dateYes

Exporting Data Items

Data Items of an active App can be exported as a TSV file. Open the editing screen of the Expense Reimbursement App, and click [Bulk Add Data Items] located at the very bottom of the Data Type button list on the left side of the [Data Items] tab. You can export the current Data Items by clicking [Export current settings as TSV File] in the window that opens.

[Note] The downloaded file name is DataDefinitions.csv, but the content is tab-delimited.

In the exported file, the first row is the header, and each subsequent row corresponds to one Data Item. There are only four columns:

ColumnContent
Item NameName of the Data Item
Data TypeSTRING_TEXTFIELD, DATE_YMD, etc.
Field NameField Name of the Data Item (blank for Guide Panel types where Field Names cannot be set)
Required1 if required, otherwise 0

[Title] is not included. Furthermore, value checks other than [Required], Initial Values, choices for Select-type Data Items, and column definitions for Table-type Data Items are not included. Choices and column definitions for Select-type and Table-type Data Items must be configured after adding them.

Bulk Adding Data Items

When a TSV file is imported, the Data Items written in the file are added all at once. The format is identical to the exported file, with one Data Item per line containing Item Name, Data Type, Field Name, and Required separated by tabs in that order. The first row is skipped as a header row. To check how Data Types are specified, refer to [Download Sample TSV File] in the [Bulk Add Data Items] window. The sample includes all available Data Types.

Field Names must start with “q_”, use only alphanumeric characters and underscores (_), and be within 64 characters. While Field Names that do not meet these rules are accepted during import, a warning icon will appear on the added Data Item, and the App cannot be released until it is fixed. Up to 300 Data Items, including [Title], can be defined in a single App (“R2012: Limits on Workflow Apps“). The current number of Data Items is displayed at the top of the [Data Items] tab.

Create a new Business Travel Expense Reimbursement App and place the same three Steps as in the Expense Reimbursement App.

At the end of the TSV file exported from the Expense Reimbursement App, append the three rows for “Destination”, “Departure Date”, and “Return Date” as follows (separated by tabs):

Destination	STRING_TEXTFIELD	q_destination	1
Departure Date	DATE_YMD	q_departure_date	1
Return Date	DATE_YMD	q_return_date	1

Open [Bulk Add Data Items] on the editing screen of the Business Travel Expense Reimbursement App, and either drag and drop the appended file or click to select the file. The imported contents will be displayed in a list; confirm them and click [Apply and Close]. The seven Data Items from the Expense Reimbursement App and the three appended Data Items will be added.

If there are rows that cannot be parsed, a message stating “n rows were ignored because they could not be parsed.” will be displayed, and Data Items in those rows will not be added. If not a single row could be parsed, “Not a valid data item definition file.” will be displayed.

After adding, verify that Data Types match your intent before configuring value checks and Initial Values. Data Types cannot be changed later (refer to “How to Correct Data Types When Wrong”). Once confirmed, configure value checks other than [Required] and Initial Values for each Data Item. In the Business Travel Expense Reimbursement App, configure the same value checks and Initial Values as the Expense Reimbursement App. For setup details, refer to “Configuring Value Checks and Initial Values for Data Items“.

Bulk Updating Edit Permissions

[Editable], [Display only], and [No display] settings per Step can be updated in bulk using a TSV file. Open [Bulk Update Data Editing Permissions] from the menu (⋮) in the upper right of the App editing screen. Export the current settings by clicking [Download TSV File] in the dialog.

[Note] The downloaded file name is accessibility.csv, but the content is tab-delimited.

The exported TSV file has the following structure:

Column 1Column 2Column 3 and Beyond
0=No display1=Display onlyStep Number
(Blank)3=EditableStep Name
-2TitleSetting Value
Data Item NumberItem NameSetting Value

Rows 1 and 2 are header rows, with setting value legends in columns 1 and 2, and Step numbers and Step Names in column 3 and beyond. Row 3 onward represents one Data Item per row, including the [Title] row (number is -2). Column 3 onward represents one Step per column. For setting values, 0 is [No display], 1 is [Display only], and 3 is [Editable].

[Note] This file identifies Steps and Data Items by numbers rather than names. A file exported from another App cannot be used as-is because the number ordering may not be identical. Please edit and use a file exported from the App you wish to update.

In the Business Travel Expense Reimbursement App, configure the seven Data Items inherited from the Expense Reimbursement App with the same settings as the Expense Reimbursement App. Set the added “Destination”, “Departure Date”, and “Return Date” to [Editable] in “Application”, and [Display only] in “Approval” and “Payment Processing”. In the file, write the same values as the Expense Reimbursement App for the seven inherited Data Item rows; for the three added Data Item rows, write 3 in the “Application” column, and 1 in the “Approval” and “Payment Processing” columns. Drag and drop the modified file into the same [Bulk Update Data Editing Permissions] window, or click to select the file. The imported contents will be displayed; verify them and click [Apply and Close].

If the imported file contains settings that cannot be selected for a specific Step and Data Item combination, a message stating “Data edit permissions have been changed. Inapplicable settings were ignored.” will appear, and those settings will not be applied. For example, because [Title] in Human Tasks only allows [Editable] or [Display only], specifying 0 will not be applied. Similarly, because Guide Panel-type Data Items only allow [Display only] or [No display], specifying 3 will not be applied. When this message is displayed, check the [Editing Permissions] tab on each Step’s configuration screen to verify that settings match your intent.

If not a single setting could be updated, “Data edit permissions were not changed because the TSV file is empty or invalid.” will be displayed.

How to Correct Data Types When Wrong

Once a Data Item has been added, its Data Type cannot be changed later. What cannot be changed are categories such as “String”, “Numeric”, and “Date”. The [Form Type] of String-types (Single line / Multiple lines / Markdown) and the [Subtype] of Date-types (YMD / YM / MD / Year) can be changed later on the Data Item settings screen. If you chose the wrong category, delete that Data Item and add it again with the correct Data Type.

Select the Data Item to delete on the [Data Items] tab, and click the trash can button or press the Delete key. A confirmation dialog will appear; click [Delete]. Holding Shift or Ctrl while clicking allows you to select and delete multiple Data Items at once. Because the Business Travel Expense Reimbursement App has not been released yet, deleting Data Items will not affect any Cases. For deleting Data Items in an active App, refer to the next section, “Handling Unused Data Items”.

Handling Unused Data Items

Deleting a Data Item in an active App makes that Data Item unavailable as a Case search criterion or as an item in CSV downloads. Even if a Data Item is no longer entered in new Cases, keep it without deleting if you want to reference values from past Cases in searches or CSV downloads.

If changing the Expense Reimbursement App’s operation so that “Project Code” is no longer entered, set “Project Code” to [No display] in all Steps. Doing so allows the App to continue running without displaying “Project Code” on task processing screens for new Cases. Values in past Cases are preserved, and Users with Data Viewing Privileges can continue selecting it as a search criterion or CSV download item.

Related Documentation