an issue with a record grid view will not sort a field

A Score Level 1
I have an issue with a column in a record list grid view. I have an element of the array that needs to correspond to another table using a lookup table and foreign keys, this element is a list of strings. so I created a expression rule and query rules to fetch the correct data. then in the grid I entered the rf!IdValue as the field,

the result was the the data was correct on the initial load but would not sort with the other data , remaining in the same rows instead of matching the other sorted rows.

I also tried adding the IdValue to the array that was returned from the expression rule. the results to this was when the sort changed the Id would move with them but the other values would not move. I have verified the expression rule is returning the correct values.

OriginalPostID-266891

  Discussion posts and replies are publicly visible

Parents
  • hi christopher: in my last project i didn't have DB user rights to create views. so one day when having to make a paging grid that required multiple reference table joins i tried to get around having to create a view and made a bunch of query rules. This didn't work as i wanted to. Create a view in your database. Map it with your XSD file to your CDT and publish that cdt in your datastore. then just pass the list of that cdt to your grid's datasubset. in your gridTextValue just have your data parameter pointing to the correct property in your CDT array and the field parameter should point to the same name. Then you will find sorting will work on this column. When you try to juggle different arrays to simulate table joins in the database it is not as effective. all of your grids that require lookup tables should be populated from views. its better practice and its easier in the long run.
Reply
  • hi christopher: in my last project i didn't have DB user rights to create views. so one day when having to make a paging grid that required multiple reference table joins i tried to get around having to create a view and made a bunch of query rules. This didn't work as i wanted to. Create a view in your database. Map it with your XSD file to your CDT and publish that cdt in your datastore. then just pass the list of that cdt to your grid's datasubset. in your gridTextValue just have your data parameter pointing to the correct property in your CDT array and the field parameter should point to the same name. Then you will find sorting will work on this column. When you try to juggle different arrays to simulate table joins in the database it is not as effective. all of your grids that require lookup tables should be populated from views. its better practice and its easier in the long run.
Children
No Data