We have a serious need for the ability to conditionally render fields based on a “business rule.” Unfortunately, the business rule true/false cannot easily be materialized in a model field value in order to leverage the stock conditional rendering features. That said, being able to leverage the stock conditional rendering is fairly critical to the overall solution.
Ask: Add the ability to call a function (snippet) in a conditional rendering rule. For example, add a new “Source Type” of snippet with a property value of “snippet name”. If chosen, skuid would call the snippet and expect a true/false result.
This has been discussed in various threads that led to the enhanced conditional rendering features that were added to skuid recently (model field value, model property, row property). Unfortunately, this one didn’t make the cut.
Wondering if this is possible to add?
Here is our specific use base:
We have fairly complex business rules and apply security through a custom approach that complements SFDC Roles/Profiles. A user might have read/write access to the Account object but for some records be restricted to Read while others records have full read/write. We need to be able to show/hide fields and editability based on a number of factors. If we were able to call a snippet, we could evaluate the rule and show/hide the field appropriately. For example, we could have a field in the editor twice - one for Read-only and one for read-write and show/hide the appropriate one based on security. This applies to other page components like buttons, tabs, etc. Unfortunately, trying to leverage record types alone does not meet the requirement. Having the ability to evaluate true/false in a snippet while being able to declaritively define the rules would be a tremendous alternative to having to programmatically create conditions on page load or the other crazy ideas that I’ve come up with so far 🙂
As always, appreciate the consderation.
Thank you!
Conditional Rendering based on result of function call
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.