Define queries in XML
The configuration of some Alfabet functionalities requires the definition of queries in XML objects. The query is defined as a value of an attribute of the relevant XML element.
For example:
- <Query
- Class="Application"
- Query="ALFABET_QUERY_500 FIND Application WHERE Application.Name LIKE ’CRM%’
- SHOW Application.Name"/>
Please take the following into account when specifying a query in an XML element.
- If you want to enter a string that contains special characters (for example, a greater then (>) or lesser then (<) symbol), you must replace the special characters with respective XML compliant code. For example:
- > for >
- < for <
- " for "
- [ for [
- ] for ]
- If you define an Alfabet query, the default specification of show and sort properties that is the standard output of the Alfabet Query Builder is an XML definition that cannot be pasted as-is into an XML attribute. Use one of the following ways to make the query XML compliant:
- Substitute all brackets with the XML compliant code.
- Rewrite the show and sort properties with the syntax: SHOW or SORT followed by ObjectClassName.PropertyName. You can define multiple properties separated by a whitespace.
For example:
- SHOW Application.Name Application.ID Application.StartDate
- SORT Application.Name
This syntax cannot be used in combination with instructions.