Multiple list source parameter

Use this paramater to a combo box column that requires to be referenced to several application data sources on which records are displayed as list. To determine the source, it must be triggered by another column.

Note: Tables to be used as source must have the same column name. For example, see columns of Address tables.

JSON Identifier: MFS@Swtch

Parameter

Description

Possible values

Col

Columns to display in the drop-down list. These columns becomes searchable. This is the SELECT statement in the client's query to the local database.

["Table.column, Table.column,…"]

Cmp

This is the parameter where we define which column to depend on for the switch.

["Table.column"]

SetTbl

This is the parameter where we define which table to set the value when a record is selected.

["Table"]

SetVal

This is the parameter where we define which column to set the value when a record is selected.

Note: Even the table to set have common column name with that of the source.

["column","column",... ]

Pk

This is the parameter used when the selected primary key of the retrieved base data table in the Switch is not used as a value but it will use another column from the retrieved base data table.

["Table.column"]

Switch

This is the parameter where the user defines which base data table to retrieve the columns from based on the column defined in Cmp. We then define a filter to the records to be retrieved. We also define what is set as a value to the columns defined in SetVal.

This explains how each operator are used:

  • = : Retrieves the value in the base data table with the same column name as that set in the SetVal column.
  • !=: Not set a value to the column in SetVal
  • Column: Retrieves the value in the base data table from the column defined and set it in the SetVal column
  • Column1|Column2|Column3: Combines the values coming from the base data table columns and set it in the SetVal column

Each switch definition will then be separated by a comma.

{"Switch Value":["Table","column=Table.column","Operator"],"Switch Value":["Table","column=Table.column","Operator"],…}

See this example:

MFS@Swtch={"Col":["AddressId","Address"],"Pk":"AddressId","Cmp":"ServiceLineAddress.AddressSource","SetTbl":"ServiceLineAddress","SetVal":["Name", "Address", "City", "State", "ZipCode", "CountryCODE", "PlaceCODE", "AddressTypeCODE","AddressType"],"Switch":{"1":["AccountAddress","AccountID=ServiceOrderHead.AccountID","=,=,=,=,=,=,=,=,!="],"2": ["CRMUserAddress","CRMUserID=ServiceAssignmentElement.CRMUserID","=,Address1|Address2|Address3|Address4,=,=,=,=,=,!=,="],"3":["EquipmentLocation","OriginIdentity=Equipment.OriginIdentity","=,=,=,=,=,=,=,=,!="],"5":["ServiceAdHocAddress","","=,=,=,=,=,=,=,!=,!="],"6":["AccountAddress","AccountID=ServiceOrderHead.AccountID","=,=,=,=,=,=,=,=,!="]}}