Page 1 of 1

Filter related items by 2 or more criteria

Posted: 09 Sep 2015
by Anton Vityaz
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.

Re: Filter related items by 2 or more criteria

Posted: 09 Sep 2015
by rostislav
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.