Is there to way to sort data in a reference field globally for a specific form

Cupcake
Mega Guru

I have a catalog form in which one of the variables is a reference type.

When the customer clicks the magnifying glass to obtain the list, I want to sort that list (A - Z) on the CID field globally for everyone.

I've sorted the table itself so that that CID   was (A - Z), but that does not sort it for everyone.

Is there a way to accomplish this? Or does everyone have to sort the list individually the first time.

find_real_file.png

Thanks,

Karen

1 ACCEPTED SOLUTION

palmen
Tera Guru

I would assume you could set a user preference for this that is system wide so everyone should get it unless they change it themselves to something else.


The user preference should be


TABLE_NAME.db.order


The value should be the field name to sort on



You can also create a user preference named


TABLE_NAME.db.order.direction


The value should be ASC or DESC depending on if it should sort ascending or descending



Make sure to mark the System checkbox so it becomes systemvide



Example for Incident table


incident.db.order -> value = number


incident.db.order.direction -> value -> DESC


View solution in original post

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

Hi Karen,



I have done this previously with a query business rule, its was quite slick



In your query business rule you have to read the url   to ensure that query is coming from this reference field, and then add the orderby code.



Let me know if you need further help, i dont have that code handy but i am sure can can help you build it again.


-Anurag

Hi Anurag,


      I forgot about the user preference. Actually it is easier than creating a new user preference. If you do the sort on the item under your own name, then go to User preference and find that update - it should be as simple as going inside of the user preference record and removing your name in the User field which will make it global for everyone. The only recommendation would be to make sure if that table is being used anywhere else that your global sort does not have any negative impact on anything else.


Yep, I liked what Fredrik suggested.


-Anurag

palmen
Tera Guru

I would assume you could set a user preference for this that is system wide so everyone should get it unless they change it themselves to something else.


The user preference should be


TABLE_NAME.db.order


The value should be the field name to sort on



You can also create a user preference named


TABLE_NAME.db.order.direction


The value should be ASC or DESC depending on if it should sort ascending or descending



Make sure to mark the System checkbox so it becomes systemvide



Example for Incident table


incident.db.order -> value = number


incident.db.order.direction -> value -> DESC