Add multiple fields to the form via an XML file
...
'Load data via XMLÂ
objQFE.LoadXML("C:\Temp\LoadXMLExample.xml")
Structure
Quik! Fields are defined by a "parent" field – the top-most field that indicates the data set type (e.g. client, account, company, representative, etc.) – and a "base" field – the lowest level field that defines the data element (e.g. first name, date of birth, address line 1, etc.).
...
- FieldBackgroundColor
- RequiredByField
- RequiredByFieldValues
- SemiRequired
- AttachTitle
- AttachFile
- RegEx
New XML Schema
<?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="ParentField"> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="Field"> <xs:complexType> <xs:all> <xs:element name="FieldName" type="xs:string" minOccurs="1" nillable="false"/> <xs:element name="FieldValue" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="FieldReadOnly" minOccurs="0" type="xs:boolean" nillable="true"/> <xs:element name="FieldVisibility" minOccurs="0" type="xs:integer" nillable="true"/> <xs:element name="FieldRequired" minOccurs="0" type="xs:boolean" nillable="true" /> <xs:element name="FieldFormat" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="FieldMask" minOccurs="0" type="xs:boolean" nillable="true"/> <xs:element name="FieldCalcOverride" minOccurs="0" type="xs:boolean" nillable="true" /> <xs:element name="HiddenField" minOccurs="0" type="xs:boolean" nillable="true"/> <xs:element name="FieldBackgroundColor" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="RequiredByField" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="RequiredByFieldValues" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="SemiRequired" minOccurs="0" type="xs:boolean" nillable="true"/> <xs:element name="AttachTitle" minOccurs="0" type="xs:string" nillable="true"/> <xs:element name="AttachFile" minOccurs="0" type="xs:boolean" nillable="true"/> <xs:element name="RegEx" minOccurs="0" type="xs:string" nillable="true"/> </xs:all> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Sample Code
To apply a red background color to field 1own.FName, a valid XML looks like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>Code Block language vb title VB.NET objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")
Code Block language c# title C# objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")
- To make 1own.FName field Semi Required, a valid XML looks like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>
VB.NETCode Block language vb title VB.NET objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")
><ParentField><Field><FieldName>1ownCode Block language c# title C# objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?
><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")