I am trying to create a user filter with the results from an expression rule which displays distinct options from my table.
I have researched the documentation, and was unable to find any answers with an example.
How do I call the expression rule to populate the options for this user filter based on the results from the expression rule I have created?
Many thanks in advance for your assistance.
Discussion posts and replies are publicly visible
Correct try above my implementation. Let me know
I applied the code for the user filter expression you provided above, which seems to be the exact code used to create the expression rule???
In any case... here's the error.
You have to replace record from line no. 9 to
a!recordFilterList( name: "OutcomeStatus", options: a!forEach( items: rule!AP_Outcome_Status(), expression: a!recordFilterListOption( id: fv!index, name: fv!item.OutcomeStatus_grouping1, filter: a!queryFilter( field: /*"Replace record here"*/, operator: "=", value: fv!item.OutcomeStatus_grouping1 ) ) ) )
Ok. Things are getting clearer.
This is my expression rule, to obtain distinct values from "OutcomeStatus" column:
Next, my user filter, which I see access the "alias" from my rule, but the rule output does not have an index.
So, the user filter is expecting an fv!index and there is none
I get no errors, but the filter displays no values.
I got it working! Thank you all for your help, and now I understand how to generate dynamic drop-down user filters for my applicaiton!
Good to hear that.