Using Expressions as Filters on a Form
3 min
using hidden expressions on a form docid\ m3aktjinwgbd112fbjbloabout using expressions as filters on a form docid\ m3aktjinwgbd112fbjbloexample adding an expression filter to the customer field for incidents docid\ m3aktjinwgbd112fbjblo using hidden expressions on a form from the configuration console, click build > business objects open a business object click the forms tab open a form highlight a field and click the control properties tab click the visible expression field and click the expression button the application displays the expression editor enter an expression such as $(if status == "logged" then true else false) click save 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 from the configuration console, click build > business objects open the incident business object click the forms tab open the incident customerownershipform form highlight the customer field and click the control properties tab click the filter expression field and enter $(\[otherobject]status == "active") click save 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 in the expression editor you can use any case to define expression for example, writing `tostring` or `tostring` expression perform the same action
