Order By as an option on Ui-Only fields that returns a number

  • 5
  • Question
  • Updated 3 years ago
  • Answered
I have several Ui-Only fields that use Model_Lookup to return a number. The field being returned is a number, and the Ui-Only field type is set to number. However, in a table, there is no check box to enable order by for this field. Is this the intended design? It would be very helpful to be able to order by these fields. 
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb

Posted 3 years ago

  • 5
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
This is not currently possible.  But UI only fields are just getting started and so we will be expanding thier capabilities in the future. 

Here is the problem. Currently, an interactive re-order action update the SOQL that is run and re-execute the query.  We want to make sure you are resorting from all the available data, not just what you have downloaded into your model.  However this is problematic with formula fields.  How should the soql be updated?  Especially with Model Lookup fields?  How should the query be rerun?  I believe for this to work in your case all the avaialbe data would have to be loaded into the model, and the re-order action be a client side action.

This is not available yet....  
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Thanks for the explanation, makes sense. Loading all data and doing the client side reorder sounds like it would be problematic for objects with lots of records. 

If its absolutely crucial that someone filter by one of these fields, I think adding a dummy salesforce field and copying the value from the ui field to the dummy field would work. Then sorting by that. Not ideal, but should work on smaller tables. 
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
Ordering by UI Only fields would be awesome +1