Skip to main content
Nintex Community Menu Bar

Provide context parameter to Conditional Rendering snippet returns true

  • July 8, 2024
  • 15 replies
  • 108 views
  • Translate All

Forum|alt.badge.img+13

Love the fact that Skuid has added the ability to call a snippet in conditional rendering!

Unfortunately, the current design does not provide any context to the snippet that is called.  While there are some use cases that just need to globally evaluate something, more often than not what needs to be evaluated in a free-form snippet pertains specifically to the data in context (e.g. table row action, etc.)

The “context” information is present in the code path that calls the snippet so would like to see this passed through to the snippet so it can be used duration evaluation.  Without this information, many of the use cases for this feature are unattainable.

Thank you!

This topic has been closed for replies.

15 replies

Forum|alt.badge.img+8

We’re definitely not done on this one in terms of adding features. Context should be passed into the snippet. We also plan on letting you specify when the snippet should be re-evaluated.

Translate

Forum|alt.badge.img+13

Happy to hear there’s more coming on this feature.  Waited a long time for this one, it’s going to make so many things so much easier.  Thanks Ben!

Translate

Forum|alt.badge.img+18

Yes. Just discovered the lack of arguments on the rendering snippet. Looking forward to the update!

Translate

Forum|alt.badge.img+20

Yup. Just discovered this as well. 😦

Translate

Forum|alt.badge.img+20

Voting for this and especially “We also plan on letting you specify when the snippet should be re-evaluated.”

Translate

Forum|alt.badge.img+20

Still waiting on this no-brainer. Another client needs this now.

Translate

Forum|alt.badge.img+9

I noticed rendering the element via skuid.$C(‘elementName’).render() doesn’t re-evaluate the snippet. Has anyone found a workaround for this?

Translate

Forum|alt.badge.img+18

Please do this soon, skuid!

Translate

Forum|alt.badge.img+18

Any update on this, Skuid?

Translate

Forum|alt.badge.img+8

I’m curious as well.

Translate

Forum|alt.badge.img+8

Here’s a use case where this capability would be very handy.  We have a bunch of Skuid pages that are setup to mimic the related lists that you find on Salesforce record detail pages.  These are leveraged throughout our Skuid application in a similar fashion to native Salesforce.  On each of these list pages, there is a “New” button, which will open a popup that loads another page in a page include to create a new record.  It would be handy to hide that button if the user doesn’t have access to create a record in order to prevent errors from occurring.  Here’s the current code required to do this (which requires many snippets) and how this might look with a parameter capability:

(Many Snippets)

if(skuid.utils.getAPIDescribeSObject(‘Account’) !== null)
    { 
        if( skuid.utils.getAPIDescribeSObject(‘Account’).createable == ‘true’ ) 
        {
            return true;
        }
    }
else{
    return false;
}


Here’s how it might look with a parameter approach where the pagebuilder could pass in the arguments:

(One Snippet) 

var sObject = arguments[0];
var permission = arguments[1];
var condition = arguments[2];
//other possible scenarios
var field = arguments[3];
var operation = arguments[4];

if(skuid.utils.getAPIDescribeSObject(sObject) !== null)
    { 
        if( skuid.utils.getAPIDescribeSObject(sObject).permission == condition ) 
        {
            return true;
        }
    }
else{
    return false;
}

Translate

Forum|alt.badge.img+20

BUMP!!!

Translate

Forum|alt.badge.img+20

Bumpity Bumpity Bump!!!

Translate

Arne-Per
Forum|alt.badge.img+8

bump^2

Translate

Arne-Per
Forum|alt.badge.img+8

one more for luck!

Translate