Hi ,
In below code default sorting is not working on UI interface.
a!gridTextColumn( label: "Served By", field: "servedBy", data: a!applyComponents( function: rule!getUserName(_), array: ri!subset.data.servedBy ) )
In this we are setting local.paginInfo in load and passing same on ein with() to this dataset subset. Then further this dataset i am passing to another rule where i am keeping grid section.
After clicking on header column sorting should be work but its not working. Tried lot but not found feasible solution.
Discussion posts and replies are publicly visible
If you're using an RI! value to pass in the data, then I'd assume the field needs to explicitly point to that location where the data actually resides. Try changing the field value to "data.servedBy" ?
i didn't get you. I am already pointing to that location only. Kindly elaborate bit more.
Hi
Rather than
field: "servedBy",
try
field: "data.servedBy"
you may need to also share what the rule!getUserName(_) is trying to achieve. I personally prefer to use the a!forEach() if that is an option to you, rather than applyComponents
Tried this option but not working. I was using forEach only but that was not working so i tried this one. I am stuck on this alot.
Ok - lets try some basic stuff to see where the problem might lie.
change your data line so that it just uses a standard display using index
data: index(ri!subset.data, "servedBy", "Data Not Found")
If the information displays correctly and sorts correctly on this combination then it would suggest an issue in your rule!getUserName.
If data doesn't show (you get the Data Not Found message) , then are you sure the input RI is being passed a datasubset ?
Show what values you are passing into via the test inputs - that might help also.