Can we sort the Text Area column in SKUID Table?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I couldn't find the "Allow ordering" check box for Text Area fields. Can we have any other way for sorting the Text Area column?
Photo of rajadurai k

rajadurai k

  • 360 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Salesforce will not allow SOQL SortBy statements on Text Area fields.  This is not our limitation. 
In addition you cannot build formula fields on Text Area fields,  that would present a workaround.  

I do not think this is possible.  Sorry.. 
Photo of rajadurai k

rajadurai k

  • 360 Points 250 badge 2x thumb
In Salesforce, We can sort the Text Area(255) fields. Its working in list view also. But Long Text area and Rich Text area doesn't support the sorting in salesforce. 
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
a regular formula can reference a short text area so you can create a formula that duplicates a short text area and then sort on that formula field in Skuid. Workflow formulas can reference long Text areas and Rich Text fields so it is possible to create a wf-rule that runs every time that a record is changed that copies the first 255 characters of a long text area or rich text field to a regular text field. That field can then be sorted in skuid or SOQL.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Hi, 

I believe that Raj is correct.  

See this link: http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_orderby.h...

These data types are not supported: multi-select picklist, rich text area, long text area, encrypted (if enabled), and data category group reference (if Salesforce Knowledge is enabled).


I did a quick test: my Skuid page does not support sorting for the Textarea datatype whereas standard VF does.


Perhaps I am missing something?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
As a work-around, you could sort the entire model by the text field, in the advanced model settings.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You are all correct.  You can sort models by adding the field to the defualt model sort field (Advanced settings)

And you can create a formula field on the Text(255) field that pulls out the first 5 or 10 characters,  and this formula field is sortable.   (But of course it is not inline editable...)

Maybe that gets 3/4 of the way there?  
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
Inline editing for a long text field is pretty ugly anyway. I would use a popup row action to edit long text fields. I guess it would be possible to attach a click handler to the formula field and popup an editor window on click.
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
In an upcoming patch release of Skuid (6.8.7), sorting / ordering will be possible on Textarea fields with up to 255 characters, because this is supported by Salesforce --- as Rajadurai correctly noted, sorting / ordering on Long Textarea fields and Rich Textarea fields is not supported by Salesforce, so it will still not be possible in Skuid to sort on these types of fields.
(Edited)
Photo of rajadurai k

rajadurai k

  • 360 Points 250 badge 2x thumb
Thanks for all of your responses 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
The fix for this is now available in patch 6.8.7, available from www.skuidify.com/skuidreleases
Photo of rajadurai k

rajadurai k

  • 360 Points 250 badge 2x thumb
Thanks Zack