Using Expressions as Filters on a Form

Using Hidden Expressions on a Form

About Using Expressions as Filters on a Form

Example: Adding an Expression Filter to the Customer Field for Incidents

Using Hidden Expressions on a Form

1.From the Configuration console, click Build > Business Objects.

2.Open a business object.

3.Click the Forms tab.

4.Open a form.

5.Highlight a field and click the Control Properties tab.

6.Click the Visible Expression field and click the expression button. The application displays the Expression Editor.

7.Enter an expression such as $(if Status == "Logged" then true else false).

8.Click Save.

9.Save the form.

About Using Expressions as Filters on a Form

Each link field on a form displays a specific business object that you select in the Display Field field under the Control Properties tab. Any business object supports a selection of fields by which you can filter instances of the business object. In some cases, however, the business object does not support the field that you need.

For example, when you create a new incident, you click the search icon on the Customer field to view a list of customers (or users). By default, all customers appear in this list whether their status is set to active or otherwise. If you only want to see active customers, you need a way to filter the list. You do that by adding an expression to the Customer field.

Example: Adding an Expression Filter to the Customer Field for Incidents

To add an expression filter to the Customer field of an Incident form, do the following:

1.From the Configuration console, click Build > Business Objects.

2.Open the Incident business object.

3.Click the Forms tab.

4.Open the Incident.CustomerOwnershipForm form.

5.Highlight the Customer field and click the Control Properties tab.

6.Click the Filter Expression field and enter $([OtherObject]Status == "Active").

7.Click Save.

8.From the application, click Refresh on the Incident workspace to refresh the Incident workspace.

Now, when you search for a customer name in a new incident, only the names of active customers appear in the list.