I have a requirement wherein I need to filter the List lookup dynamically. My list has a column called 'category' that can either contain value 'A' or 'B'. Then there is a field -'Selection' on the Content type that can either take value 'A' or 'B' or 'All' . If its 'A' I need the List lookup to take rows where category = 'A' , same goes for 'B'. However if the 'Selection' is - 'All' then I need to display all the items from the list.
I was thinking of filtering the List lookup for the column - 'Category' . But the problem is as I am on a content type form , I do not have any variables that can be set dynamically.
I can not use the Filter by control mapped to 'Selection' as the it does not work when the selection is 'All' (There is no value called 'All' under category in the list).
I tried using a calculated value that operates on a formula and tried using it in Filter by specific value in List lookup , but the filter doesn't work as the list lookup loads before the calculated value on form load and hence the calculated value is always empty for the filtering.
Is there any way I can achieve this functionality.
Thanks in advance
Today, I had the same kind of requirements in O365. To make it work:
1) I have created a calculated value which depends on the category (in your example, it could be "A", "B" or "" if the choice is "All").
2) The filter option on the list lookup is "By a control's value". The control is my calculated value.
3) The "Action when no filter applied" is "Show all values".