Notice: This site is now in read-only mode and will no longer be updated.
Please visit our new and improved Knowledge Base at https://kb.joget.org/ for the latest content and updates.
to import bulk data (in a .csv or Excel file) into a specific
...
Joget form. The Import Menu properties allow you to perform simple column-to-field mapping
...
. When importing records, you can specify the following import mode:
Delete record: Delete matching records in database if matches the csv or Excel file based on 'id' primary key.
During import, you can click the "Validate data" checkbox to perform data validation based on the form field validation rules.
Image Added
Import Menu Properties
Configure Import Menu
...
Figure 1: Import Menu in Userview
Name
Description
Select File
Extensions supported are:-
csv
xls
xlsx
Import Mode
This would allow you to manage existing records. Choices are:-
Import new record only
Import new record or update existing record
Delete record
Validate data?
When checked, value from source will be validated against the specific form element's validator that it is mapped to in the "Column Mappings" property.
...
Image Modified
Figure 2: Post submission result in Userview
Image Modified
Figure 3: Import Menu Properties
Name
Description
Custom ID
Item link slug. Optional field.
Info
title
Unique field
Value defined here must be unique to the rest of the Userview Menus as the first matching name will be called upon.
Label
Menu label.
Form
Specify on where to store the data by choosing a target form.
Info
title
How storing works?
The target form's store binder will be called upon for data storage.
Info
title
Post Form Submission Processing
Any Tool mapped under Post Form Submission Processing of the target form will be triggered each time a record updated or created.
Important: The tool mapped will be triggered regardless of the Run Tool on attribute. Image Modified
Column Mapping
Name
Description
Column Number
Column number from the source file. Column number starts from zero.
Image Modified
Field Name
Corresponding element ID in the form set above to be mapped to.
If you are referring to a Subform in the target form, remember to prepend the field name with subform element ID followed by an underscore.
Info
title
Example
Image Modified
Subform ID: subform
Form ID set in the Subform: child
Field ID in the subform: name
Field Name: subform_child_name
Key Column Number
Define column number that defines the record id. Column number starts from zero.
Start From Row Number
Define which row number to start processing. Row number starts from zero.
Custom CSV Delimiter Character
Symbol to represent the delimiter separater.
Custom CSV Quote Character
Symbol to represent the regular quote character.
...
Image Modified
Figure 4: Import Menu Properties - Actions
Name
Description
Confirmation Message
Confirmation Message.
Message shown when error occur
Message shown when error occur.
Message shown after data imported
Message shown after data imported.
Redirection (Hyperlink)
URL to redirect.
...
Image Modified
Figure 5: Import Menu Properties - UI
Name
Description
Custom Header
Custom Header in HTML.
Custom Footer
Custom Footer in HTML.
Disable delete record feature
Disables the option for end users to delete records.
...
Image Modified
Figure 6: Import Menu Properties - Advanced
Name
Description
Userview Key Name
Corresponding element ID in the form set above to be mapped to (same like the mapping in "Column Mapping" above).
When defined, the Userview Key value will be saved into the field defined here.
UTF-8 Encoding Checking?
When checked, it will check the uploaded file if it is a valid UTF-8 encoded file.
Panel
borderColor
blue
borderWidth
1
borderStyle
solid
Example:
With the configurations above, we will attempt to import the following data in the screenshot below.
Image Modified
Figure 7: Source data highlighting data that will be imported into the target form's database table (master)
Image Modified
Figure 8: Data written into the form table (master)
Image Modified
Figure 9: Source data highlighting data that will be imported into the target form's subform's database table (child)
Image Modified
Figure 10: Data written into the form table (child)
...
...
Panel
borderColor
purple
borderWidth
1
titleBGColor
#ddccff
borderStyle
solid
title
Performance
You can configure the Performance settings in this Userview Element which allows one to cache existing content for improved performance and loading speed. Read more at Performance Improvement with Userview Caching