How to order a the choices on a variable that uses another table's choice field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2014 07:31 AM
For a catalog variable, you can 'borrow' a choice field from another table, hence using those choices for said variable. The choice list for the original field does have sequence settings, however, the sequence setting seems to be ignored when the choice list is used in conjunction with the variable. From what i can tell, the variable only uses lexicographical order based on the choices "values."
Does anyone know how I can go about ordering the (borrowed) choices in the catalog variable?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2014 09:02 AM
In order to better troubleshoot your issue, we need to know how the variable is currently set up. Please provide us with the configuration you used for your variable so we can duplicate your issue and determine the best solution.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2014 10:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2014 11:52 AM
One way I have gotten around the sorting problem is to use a Lookup Select box and point the Lookup to the Choice table. I am guessing that the subcategory 2 field on the Task table is a custom field called u_subcategory_2. Based upon this, here is the variable settings to try:
Type: Lookup Select Box
Lookup from table: Choice [sys_choice]
Lookup value field: Value
Lookup label field(s): label
Reference qual: element=u_subcategory_2^name=task^inactive=false
This should give you the variable choices in alphabetical order. If you need to have it in sequence order, then you will need to do some scripting and actually build the menu.
Let me know if this is helpful, or if you need to actually build the menu through a script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2015 12:30 AM
There is no need to create additional scripts.
Just add ORDERBY and the column name to the reference qualifier.
E.g. for the choice table:
ORDERBYsequence^element=u_subcategory_2^name=task^inactive=false