Skip to content

NTFormsFillComboFromFile

amaneiro edited this page Dec 8, 2011 · 2 revisions

Step1: what to write in the xml

<FIELD>
    <FIELDNAME>yourcombo</FIELDNAME> <!-- field to fill with domain values -->
    <DOMAINREADER>
        <DRTYPE>file</DRTYPE> <! set the reader as a filereader -->
        <DRFILENAME>yourfile.domain</DRFILENAME> <!-- the values are read from this file -->
        <DRFILEFIELDALIAS>yourkeyinthefile</DRFILEFIELDALIAS> <!-- what the domain values are -->
    </DOMAINREADER>
</FIELD>

Step2: what to write in the file yourfile.domain

Here an example of contents in the file:

yourkeyinthefile=Alias1,value1;Alias2,value2;Alias3,value3
otherkey=Alias1,value1;Alias2,value2;Alias3,value3

where:

  • Alias1 = the value shown in the combo to the user
  • value1 = the value retrieved from and stored to the datasource

Step 3: compile and enjoy!