Add condition on UI model ?

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Actual, I was able to add the condition on UI Model through XML, but when i try to activate the condition through Table filter (Toggle) (NOTE: Table use UI model to display data), its not functioning properly. Would be glad if someone could help me with this.
Photo of ace

ace

  • 580 Points 500 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
ace,

Skuid does not support filtering on a UI Only field (or model as far as I know).  See the reply on this conversation->  https://community.skuid.com/skuid/topics/filter-based-on-ui-only-field

What is your use case?  Why did you build a UI only model that you now want to filter?

Thanks,

Bill
Photo of ace

ace

  • 580 Points 500 badge 2x thumb
Hello Bill,
           Thank you for the reply. Actually we are using Salesforce Employee Community license for some of our users.Since this license type has limited access to the object and we don't have direct access to the "Product" in salesforce, I have written APEX class in salesforce to pass the list of product (in JASON format) to Skuid UI model. I have been able to display list in table, but I can't have filter in Table that use UI Model.
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
ace,

Got it.  You'll have to add some more JavaScript if you want sorting and filtering.

Another option is to build a trigger that will create a mirror record of each product in a custom object.  Then you can display this custom object and use declarative Skuid for sorting and filtering.

I think your license gets you access to 10 custom objects.

Thanks,

Bill
Photo of ace

ace

  • 580 Points 500 badge 2x thumb
Bill,
               Thank you for reply. Table Filter doesn't even have an option to run snippet. Do you have any suggestion on how to apply snippet to the table filter?

Thanks !
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
ace,

I would use a UI only model and fields to represent picklists or reference fields.  Then add a field editor above your table and use a model action to run your snippet when one of the model ui field changes.

Thanks,

Bill
Photo of ace

ace

  • 580 Points 500 badge 2x thumb
Thank you Bill. Will do the same thing.