Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSourceField XML format for defining pickListFields

    I want to use a dynamic form that uses more than just the foreign key "displayField" in the pick list.

    The schema for DataSourcefield shows support for the "pickListFields" attribute but I have looked high and low but cannot find an example how to enter the fields. Per the Javadoc it would accept a string array of field names if defined in ?Java but I would like to use XML.

    Tried the below XML snippet amongst a number of others including using "item" instead of "field" and things like pickFields="["last_","last_"]" but have an XML parsing error for everything I have tried except if I leave the attribute blank :

    <?xml version="1.0" encoding="UTF-8"?>
    <DataSource ID="usrDs" dataFormat="iscServer" serverType="sql" dbName="PostgreSQL" tableName="usr">
    <fields>
    <field name="id_" type="integer" primaryKey="true" required="true" hidden="true" />
    <field name="con_id_" type="integer" foreignKey="conDs.id_" displayField="last_" editorType="ComboBoxItem">
    <pickListFields>
    <field>first_</field>
    <field>last_</field>
    <pickListFields>
    <field includeFrom="conDs.name_" hidden="true"/>
    <field name="login_" type="text" length="125"/>
    </fields>
    </DataSource>


    Any help appreciated.
    Last edited by uhurusurfa; 30 Mar 2017, 22:56.

    #2
    I have since figured it out. For thise who want to use the same:

    <pickListFields>
    <field name="last_"/>
    <field name="first_"/>
    </pickListFields>

    Comment

    Working...
    X