Filter related items by 2 or more criteria
- Anton Vityaz
- Posts: 7
- Joined: Mon Jun 22, 2015
Could you please help to clarify how we can filter related items by 2 or more criteria?
For example filter by lookup ID and by State field. Both fields defined on form at runtime and none of them could not be selected as a static filtering in view.
For example filter by lookup ID and by State field. Both fields defined on form at runtime and none of them could not be selected as a static filtering in view.
To create a filtering based on multiple fields:
1. Create a calculated field based on the fields that you require, for example: =CONCATENATE(Title,",",CustomField). Do this for both lists.
2. Because you cannot directly use a lookup field with a calculated field, create a separate text field and copy the value of the lookup field into it (you can do this with JavaScript or in a workflow). Then use the resulting text field in the calculated field formula.
3. Use the calculated fields for filtering in the related items control.
1. Create a calculated field based on the fields that you require, for example: =CONCATENATE(Title,",",CustomField). Do this for both lists.
2. Because you cannot directly use a lookup field with a calculated field, create a separate text field and copy the value of the lookup field into it (you can do this with JavaScript or in a workflow). Then use the resulting text field in the calculated field formula.
3. Use the calculated fields for filtering in the related items control.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 23 guests