Hi,
I have a very simple RecordType with a user filter (example : year). I've created an interface based on this recordType.
When I test it from the interface, I enter a year in the field, then the grid is correctly filtered by the year.
Question : you to get the filter value the user has selected (to use it later in an Expression rule for example) ?
Discussion posts and replies are publicly visible
This isn't currently possible - can you provide more context on how you'd like to use this elsewhere in your interface?
Thank you for your reply Peter... But my need is as simple as it ;-) ...
We just need to use the current selection filter value (let's say it is a year value) to pass it to another ER.
From my example, let's admit that the "Year" field is in the data of RecordType grid,
If I use this kind of code below to get the Data of the RecordType, maybe can I get this "year" value from one of the row, as a workaround ?
local!data: a!recordData( recordType: recordType!CJT_R_Vehicles,),
I could do something lke that ? (with a correct cast)
myYearValue: local!data[1].year
No it isn't possible to expose the filter selections via a!recordData(). You mentioned that you want to use it in expression rule, but how is that expression rule being used? What outcome are you trying to achieve on your interface?
Thank you for your reply Peter.
And if we forget the filter story. Is it possible to read some data from the recordData result, like I tried ?
(just for my own information)
local!value: local!data[1].myField
No, unfortunately the a!recordData() function is just used to define the source and filters for a grid or chart. If you want to get data, you will need to use a!queryRecordType().
Ok, I see, thank you Peter.