Add multiple fields to the form via an XML file

Use this method to prefill any visible or hidden fields on the form. It is recommended that you attempt to fill every field for which you have data-- this ensures that the same data to all of the forms regardless of whether the form has the corresponding field. Any extraneous data supplied to the form is ignored.

Hidden fields can also be added to forms so that you might pass hidden data (e.g. system data you need submitted back but don't want the user to see). Simply add the field with a unique field name and the value to populate and it will be added to the end of the form. Then, when a user submits the form, the hidden data will be submitted too.

Example:

'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.).

The field naming convention is as follows: {ROLE NUMBER}{PARENT FIELD NAME}.{BASE FIELD NAME}

A field is defined by the parent and its child field(s). For example, the primary account owner's first name is defined as:

Parameters

Parameter

Description

FileName

Sets the name of the XML file to upload

Applying Background color (and other attributes) via LoadXML

We made the background color of a field to be settable via LoadXML method, as well as other field attributes that were only configurable via AddFieldToForm method. The list of attributes included in this release are:

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

1. 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>


VB.NET

objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")

C#

objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")


2. 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.NET

objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")

C#

objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")