ApplyRulesToDataset – XpressDox

It may be that all, or at least some, of the data set to be used to assemble a document comes from some place other than the interview.  For example, it might be that the data are in a data base, or retrieved from a web service or some other data source.  Often data sets like this can contain data elements which are wrongly formatted or which in some other way do not conform to the business rules for the template that is being run.  In this case it might cause a dangerously inaccurate document to be assembled from the data and template.

The ApplyRulesToDataset command will cause all the Rule commands to be executed against the data set, regardless of whether there is an interview or not.

The Rules will be evaluated just before the data set is passed to the assembly engine where the data set is merged into the template. If any of the rules fail, then an error message will be displayed and the assembly terminated.

The ApplyRulesToDataset takes one argument, with the following meanings:

  1. «ApplyRulesToDataset(Yes)»: the command will be applied.
  2. «ApplyRulesToDataset(IgnoreSoftRules)»: any “soft” rules (see Tips and Hints using the Rule Command) will be ignored.
  3. «ApplyRulesToDataset(No)»: the command is ignored completely.