Reference qualifier "ORDERBY" and javascript does not work

Shuhei2
Tera Contributor

I set a value "ORDERBYu_order^javascript:'u_language='+gs.getSession().getLanguage()" in a Lookup Select Box variable.

Target custome field has fields, u_order and u_language.

I'd like to let users see only the choices filtered by their Language, and sorted by order.

Now users can see all records sorted by u_order in the target table.

Please help me.

Best regards.

1 ACCEPTED SOLUTION

Michael Jones -
Giga Sage

I think Allen A was on the right track, but I would go with: 

javascript: 'ORDERBYu_order^u_language='+gs.getSession().getLanguage();

You need to make sure that all of the qualifier is within the quotes and that you are appending with the results of your expression. 

 

If this was helpful or correct, please be kind and remember to click appropriately!

Michael Jones - Proud member of the CloudPires team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

5 REPLIES 5

Hi I am doing something similar but I am calling a script include that return a string reference qualifier. I cannot get ORDERBY or ORDERBYDESC to work in that return. I have tried returning it at the beginning of my string and at the end. I have tried putting it in the reference qualifier directly as well. Additionally, I have tried using the attribute "ref_ac_order_by" to no avail. 

u_version_sort_order is an integer field on the table referenced by the Lookup Select Box.

Any tips or ideas would be appreciated.

Example of trying it directly in the reference qualifier. 

javascript: new assetHelperG().getVersions(current.variables.fd_product) + '^ORDERBYu_version_sort_order';