The Values to XML Module is used to write out XML data from InputAccel. When you map the values to your template XML file, you have the option of checking the “Write if Empty” flag. If checked, this flag will mean that the tag will still be written even if there is no data for that tag.
Normally, the “Write if Empty” flag is checked or unchecked when you configure your InputAccel process, however, there may be a need to dynamically change this flag.
Being able to dynamically change this flag allows you to decide whether to output empty tags from within your process VBA code, rather than having it set in the configuration settings.
InputAccel does not expose these flags in the IA Values which means that unless you manually expose these flags, you cannot alter their values dynamically.
To expose the “Write if Empty” flags, you need to do the following…
1. Create a new text file called “ValXML.mdf” and store it in the same directory as your process.
2. Add the following code to your ValXML.mdf file…
Module VAL2XML(T)
SkipIfBlank1 as String,Input
SkipIfBlank2 as String,Input
SkipIfBlank3 as String,Input
SkipIfBlank4 as String,Input
SkipIfBlank5 as String,Input
End Module
3. Add as many lines of “SkipIfBlankIn as String,Input” as you have tags in your XML template.
4. Include the ValXML.mdf file to your process using Process Developer…
a. From the Process Developer File Menu, select “File” then “Modify Instances”
b. Click the “Select MDFs…” button
c. Click the “Add MDF…” button
d. Browse to and select your new ValXML.mdf file and click the “Open” button
e. Click the “OK” button on all of the dialogs until you are returned to the main Process Developer screen.
5. You can now reference the “SkipIfBlankIn” values in your VBA code in the same way you would access any other IA Value.
Comments