«LinkToOtherData()» enables the template author to define that when a template is being run and the user moves the cursor out of the control for the data element in the interview, that the equivalent of pressing the User Other Data button on the interview is performed. This uses the data already captured (which may, or may not, include the data on the control being referenced in the command) in the interview, along with the definition in the configuration of where the captured data sets are to be stored.
Suppose, for example, that the configuration specifies that saved data sets are stored in files identified by an account number, e.g. the data element called AccountNumber.
Then, if the user knows the account number and enters it then,
«LinkToOtherData(AccountNumber)» command will access that saved data set and populate the interview with its data. Exactly, as stated earlier, as if the user had chosen the data set file using the Use Other Data button.
It is not necessary that the data element passed to the command is, in the above example, the AccountNumber. It can be any data element in the interview (e.g.
«LinkToOtherData(PriceOfGoods)»), as long as the value (or values) of the data element(s) which make up the name of the saved data set file are known at the time the user exits from the data element referred to in the LinkToOtherData. In other words, in the above example, as long as AccountNumber has the right value when the user captures PriceOfGoods, the command
«LinkToOtherData(PriceOfGoods)» will get the correct data set.
Note that this feature is available only in Version 4 and later of XpressDox.
Note that with effect from version 4.3.1 of XpressDox, this feature works slightly differently with checkboxes, radio button lists and drop down lists with fixed values (i.e. not those created for ChooseFromSamples): in these cases the data are retrieved from the data set not when the control loses focus, but when the user chooses a value from the control. This seems to be more intuitive in these instances.