Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2000_concepts:0600_data_retrieval:0400_form_driven_queries [2022/08/21 22:56] – ↷ Links adapted because of a move operation administrator2000_concepts:0600_data_retrieval:0400_form_driven_queries [2026/08/13 00:55] (current) – ↷ Links adapted because of a move operation localdev
Line 1: Line 1:
-[<10>]+{{tag>data data_retrieval query search form user_interface ui concepts operators}}[<10>]
 ====== Searching for Data using Forms ====== ====== Searching for Data using Forms ======
  
-Another way of retrieving data in the Operation Mode is using forms to search for business objects (see [[:1300_user_guide|[[#HelpUsingForms|Business Object Forms]]). The idea is that the user is presented with a blank form of a business object. She can enter values in any field of the form, and when the form is submitted //**Aware IM**// will search for instances of this business object using the entered data. To do this //**Aware IM**// automatically builds and runs a query. When building a query //**Aware IM **//constructs a query condition for every value entered by a user and connects them using the ''AND'' operator. Blank fields are ignored. +Another way of retrieving data in the Operation Mode is using forms to search for business objects (see [[2000_concepts:0400_data_entry_and_editing:0100_forms|Business Object Forms]]). The idea is that the user is presented with a blank form of a business object. She can enter values in any field of the form, and when the form is submitted //**AwareIM**// will search for instances of this business object using the entered data. To do this //**AwareIM**// automatically builds and runs a query. When building a query //**AwareIM**// constructs a query condition for every value entered by a user and connects them using the ''AND'' operator. Blank fields are ignored. 
  
-For example, lets say we have a ''Customer'' business object with the following attributes: ''FirstName'', ''LastName'', ''DOB'', ''Address'' and ''TelephoneNo''. If the user enters "John" in the ''FirstName'' field of the form and "Smith" in the ''LastName'' field //**Aware IM **//will find all customers with the first name John” and the last name Smith.+For example, let's say we have a ''Customer'' business object with the following attributes: ''FirstName'', ''LastName'', ''DOB'', ''Address'' and ''TelephoneNo''. If the user enters "John" in the ''FirstName'' field of the form and "Smith" in the ''LastName'' field //**AwareIM**// will find all customers with the first name "Johnand the last name "Smith".
  
 It is also possible for a more advanced user to enter not only simple values into the fields of a form but also expressions. The following table lists all possible keywords that can be entered into a field: It is also possible for a more advanced user to enter not only simple values into the fields of a form but also expressions. The following table lists all possible keywords that can be entered into a field:
  
-^Keyword   ^Aware IM search behaviour^ +^Keyword   ^AwareIM search behaviour^ 
-|Literal value (string, number, date, timestamp)|For Plain Text attributes //**Aware IM**// will search for objects the attribute values of which contain the specified value; for all other attribute types – that are equal to the specified value|+|Literal value (string, number, date, timestamp)|For Plain Text attributes //**AwareIM**// will search for objects the attribute values of which contain the specified value; for all other attribute types – that are equal to the specified value|
 |''<''|All objects with attribute values less than the specified value, for example: ''<5''| |''<''|All objects with attribute values less than the specified value, for example: ''<5''|
 |''>''|All objects with attribute values greater than the specified value, for example: ''>5''| |''>''|All objects with attribute values greater than the specified value, for example: ''>5''|
Line 15: Line 15:
 |''>=''|All objects with attribute values greater or equal than the specified value, for example: ''>=5''| |''>=''|All objects with attribute values greater or equal than the specified value, for example: ''>=5''|
 |''<>''|All objects with attribute values not equal to the specified value, for example: ''<>5''| |''<>''|All objects with attribute values not equal to the specified value, for example: ''<>5''|
-|''=''|All objects with attribute values equal to the specified value, for example: ''=John Smith%%%%''|+|''=''|All objects with attribute values equal to the specified value, for example: ''='John Smith%%'%%''|
 |''CONTAINS''|All objects with attribute values that contain the specified value, for example: ''CONTAINS  25''| |''CONTAINS''|All objects with attribute values that contain the specified value, for example: ''CONTAINS  25''|
-|''STARTSWITH''|All objects with attribute values that starts with the specified value, for example: ''STARTSWITH John%%'%%''|+|''STARTSWITH''|All objects with attribute values that starts with the specified value, for example: ''STARTSWITH 'John%%'%%''|
 |''ENDSWITH''|All objects with attribute values that ends with the specified value, for example: ''ENDSWITH 'ith%%'%%''| |''ENDSWITH''|All objects with attribute values that ends with the specified value, for example: ''ENDSWITH 'ith%%'%%''|
 |''BETWEEN'', ''AND''|All objects with attribute values that are in the specified range, for example ''BETWEEN 5 AND 10''| |''BETWEEN'', ''AND''|All objects with attribute values that are in the specified range, for example ''BETWEEN 5 AND 10''|
Line 23: Line 23:
 |''OR''|Either of the conditions is included, for example ''<5 OR >20''| |''OR''|Either of the conditions is included, for example ''<5 OR >20''|
  
-<note>If the user enters data into the field of a [[:1300_user_guide|[[#HelpUsingReferenceAttributes|reference attribute]]]] //**Aware IM**// will search through the related instances.</note>+<callout type="primary" icon="true" title="note"> If the user enters data into the field of a [[2000_concepts:0200_basics:0400_reference_attributes|reference attribute]] //**AwareIM**// will search through the related instances.</callout>
  
-To configure an operation that will invoke a search using forms as explained above the configurator has to tick the “Using form” checkbox on the query property editor – see [[:1300_user_guide|[[#HelpQueries|Adding/Editing Queries]]]].+To configure an operation that will invoke a search using forms as explained above the configurator has to tick the “Using form” checkbox on the query property editor – see [[2500_config_apps:1100_add_edit_queries|Adding/Editing Queries]].
  
-<note>When you use form-based queries it is also possible to specify query conditions when defining a query. These conditions will be used as //extra// conditions and will be automatically added to the query after the user enters data into the query form.</note>+<callout type="primary" icon="true" title="note"> When you use form-based queries it is also possible to specify query conditions when defining a query. These conditions will be used as //extra// conditions and will be automatically added to the query after the user enters data into the query form.</callout>
  
 Advantages and disadvantages of using form-based search versus defining queries that require user input. Advantages and disadvantages of using form-based search versus defining queries that require user input.
  
-If you want users to be able to enter their search criteria dynamically at run time, you have two configuration options at your disposal – configure [[2000_concepts:0600_data_retrieval:0110_queries_user_input|queries requiring user input]] or using [[#HelpUsingFormBasedSearch|business object forms to search for data]]. Which one is better? There are advantages and disadvantages of using either method:+If you want users to be able to enter their search criteria dynamically at run time, you have two configuration options at your disposal – configure [[2000_concepts:0600_data_retrieval:0110_queries_user_input|queries requiring user input]] or using business object forms to search for data. Which one is better? There are advantages and disadvantages of using either method:
  
-  * Using forms often requires less configuration effort, as you dont need to configure a query (in some cases, however, you may want to configure a special form)+  * Using forms often requires less configuration effort, as you don't need to configure a query (in some cases, however, you may want to configure a special form)
   * Using forms may be more flexible as it offers a large number of attributes to the user to search by. However, it may be confusing to some users as some of the attributes may not be relevant to a particular search.   * Using forms may be more flexible as it offers a large number of attributes to the user to search by. However, it may be confusing to some users as some of the attributes may not be relevant to a particular search.
   * Forms offers the power of expressions to advanced users, however, for users who do not want or cannot use expressions it is better to offer a simple way of entering a value only.   * Forms offers the power of expressions to advanced users, however, for users who do not want or cannot use expressions it is better to offer a simple way of entering a value only.