Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
The Import Menu enables a user to import bulk data into a specific form and doing a simple column-to-field mapping.
 Image Added
Figure 1: Import Menu in Userview
NameDescription
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 Added

Figure 2: Post submission result in Userview

Image Added

Figure 3: Import Menu Properties

in v5... each mapping is equal to a input name 
if the field is in subform, then the field id need to prefix with the id of subform lah
this allow u to import to several tables based on the form binder in the form 
tht y i told u ..u can even import user.. or using bean shell for import
becoz the import is handle by the form binder
the validation is handle by form as well
account_id is the field id
account_crm is the subform id
it is follow the form input name
when u check the input field in ur subform using firebug.. u can see this

 

NameDescriptionFile Upload FormSpecify the source Form where File Upload element resides.Upload Field IDFile Upload element ID in the specified form above.Store Data
NameDescription
Custom ID

Item link slug. Optional field.

Info
titleUnique field

Value defined here must be unique to the rest of the Userview Menus as the first matching name will be called upon.

LabelMenu label.
Form

Specify on where to store the data by choosing a target form.

Info
titleHow storing works?

The target form's store binder will be called upon for data storage.

Column Mappings
Info
titlePost 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 Added

Column Mapping

Image Added

Map the source file's CSV values to the target form fields.

NameDescription
Column Number
Refers to the column number in
Column number from the source
CSV. Integer only,
file. Column number starts from
0
zero.
Field Name
Must be a

Corresponding element ID in the

target

form

specified above, "Store Data 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
titleExample
Image Added

Subform ID

: account_crm

: subform

Form ID set in the Subform: child

Field ID

: account_id

in the subform: name

Field Name:

account

subform_

crm

child_

account_id

name

Key Column Number
Column
Define column number that
holds the primary key value.If nothing is defined, a UUID will be assigned when importing
defines the record id. Column number starts from zero.
Start From Row Number
Row

Define which row number to start

importing data. Integer only, starts from 1.Foreign Keys

Define other values that can not be found in the CSV file such as Foreign Key value associations data. You may also define hard-coded value here too.

NameDescriptionField NameField name in the target form.Value

Value to be set.

Hash Variable is accepted.

processing. Row number starts from zero.

If the import data has header text on row 1, row number starts from one.

 

Image Added

Figure 4: Import Menu Properties - Actions

NameDescription
Confirmation MessageConfirmation Message.
Message shown when error occurMessage shown when error occur.
Message shown after data importedMessage shown after data imported.
Redirection (Hyperlink)URL to redirect.

 

Image Added

Figure 5: Import Menu Properties - UI

NameDescription
Custom Header Custom Header in HTML.
Custom Footer Custom Footer in HTML.

 

Image Added

Figure 6: Import Menu Properties - Advanced

NameDescription
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.


Example:

With the configurations above, we will attempt to import the following data in the screenshot below.

Image Added

Figure 7: Source data highlighting data that will be imported into the target form's database table (master)


Image Added

Figure 8: Data written into the form table (master)


Image Added

Figure 9: Source data highlighting data that will be imported into the target form's subform's database table (child)


Image Added
Figure 10: Data written into the form table (child)

Import Mode

 

Run Time OptionDescription
Import new record onlyImport only if the import data id value does not exist (match) in the form database, i.e. new records only.
Import new record or update existing recordImport into form database all records in import data.
Delete recordDelete records in form database if the import data id value exist (match) in form database.