Hello Everyone,
I have an editable Grid, which contains a Cascading Drop down as shown below, where as the category displays 'MI' and Skills pop up related to that. I also have multiple values as such. And i can add more rows to it.
The following is the Rule Input
Now, how can I to have a median calculated based on "ri!CC_Person.skills.Rating" only for 'MI' even though I add more rows and select 'MI' with the rating.
Thanks in advance..!!
Discussion posts and replies are publicly visible
Try this updated version of Ashvin's code. I've added some safeguards here, the main one being:
Indexing instead of using dot notation - As stevens812 noted, if ri!CC_Person.skills is null (not typed), we would get the error you posted. By indexing, we avoid the UI error.
a!textField( value: median( index( index(ri!CC_Person.skills, "rating", {}), wherecontains( "MI", touniformstring(index(ri!CC_Person.skills, "category", {})) ), 0 ) ), readOnly: true() )