Multiple list source parameter

Use this paramater to a combo box column that needs to be referenced to several application data sources on which records will be 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 where we define which column to depend on for the switch.

["Table.column"]

SetTbl

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

["Table"]

SetVal

This is 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 used when the retrieved base data table’s primary key selected 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 where we define 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 will be set as a value to the columns defined in SetVal.

This explains how each operator are used:

  • =’ means it would retrieve the value in the base data table with the same column name as that set in the SetVal column.
  • !=’ means it would not set a value to the column in the SetVal.
  • Column’ means it would retrieve the value in the base data table from the column defined and set it in the SetVal column.
  • Column1|Column2|Column3’ means it would combine 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","=,=,=,=,=,=,=,=,!="]}}