Applies to: Identity Panel 7.5 or later
With the release of version 7.5 it is now possible to construct a list of Value Choices for a Select Input parameter using a rule expression.
Constructing a rule expression
The following rule expression, when pasted into Value Choices control of a Select Input parameter (set required == true!), will populate the value choices with the names of the various names of a known enumeration (dictionary) when the report is run from the Reports menu:
[Map(Flatten(SpecialDict("History Type")), Key)]To construct a list from a different collection, replace History Type in the above expression with any of the Enumeration names as shown in the Rule Helper (Special Values section).
This then can be used in a report of History Record objects where the RecordOf property matches the result of the following rule expression (where the name of your parameter is History Type):
Key(SpecialDict("History Type"), $"special.History Type.{Memo("History Type")}")//special.History Type.Schedule RunExtending the concept
Sometimes it is desirable to include an all items option in your select list. This is usually denoted by the use of a *.
The following expression prepends a * to a Select Input list of a filtered subset of Enumerations. Here we use a Union function to merge 2 lists, a Map and Filter function to exclude unwanted list options, and a ReplaceString function to transform the result set for use in a query filter.
Union(
List("*"),
Map(
Filter(
SpecialDict("Enumerations"),
And(
ContainsNoCase(Key, "Panel Action Status"),
CoerceLong(context.Value) > special.Enumerations.Panel Action Status: Pending
)
),
ReplaceString(Key, "Panel Action Status: ", "")
)
)The parameter can then be used in a query filter on the Status property of a Panel Action data set as follows:
If(Memo("Status") == "*", 0, Key(SpecialDict("Enumerations"), $"Panel Action Status: {Memo("Status")}"))
Comments
0 comments
Please sign in to leave a comment.