Reference Qualifier does not seem to be calling Script Include

Izzy B1
Tera Guru

I'm working on a record producer on a scoped application. I need to filter options available on a reference variable based on whether or not another checkbox variable is checked. What I am sharing is a simplified case of what I am trying to do - but I can't even get this simple case to work.

 

Using 'Advanced' reference qualifier

Reference Qualifier is

javascript: new limitProductDeliverables().limitDels(current.variables.checkbox_variable_name);

 I have also tried using the full API name of the script include and nothing happened.

I have tried adding ref_qual_elements=checkbox_variable_name to the Variable Attributes on the reference and it didn't help any.

 

I have seen no indication that this call is working.

 

My simplified script include has been tested accessible from all scopes, from this application scope only, and also as client callable and not. Script follows (again this is not what I'm trying to do with the script, I was just trying to make sure I could get the call to work first):

var limitProductDeliverables = Class.create();
limitProductDeliverables.prototype = {
    initialize: function() {},

    limitDels: function(check) {
		gs.info('Product Deliverable value = ' + check);
	
        if (check == 'true') { 
             return "product_deliverable=A";
         }else {
             return "product_deliverable=B";
         }
		
    },

    type: 'limitProductDeliverables'
};

 

I'm pretty sure that my script include is not even being called and that my reference qualifier is not right, but I feel like I've tried everything I could find. I have very limited experience in script includes.

The checkbox in question is with other checkboxes under a Label on the record producer, so I don't know if that makes a difference. In my frustration to get this to work I even tried 'current.variables.label_name.checkbox_variable_name' in the reference qualifier.

 

I am simply out of ideas. Does anyone have any thoughts? Will this just not work in a scoped application or a record producer?

Thanks for reading down this far!

1 ACCEPTED SOLUTION

Hello Swathi,
I have an update to share. This morning I decided to try moving the Script Include out of my scoped application and into Global. It worked as written, I didn't need to have variable attributes or client callable.
I have written Script Includes for scoped applications in the past that did work, but not any that were used on a record producer. For whatever reason, it just wasn't working in-scope.

Thank you for your support on this!

Izzy

View solution in original post

5 REPLIES 5

swathisarang98
Giga Sage
Giga Sage

Hi @Izzy B1 ,

 

Could you please confirm whether your variable(checkbox_variable_name) is coming from variable set and can you please share the screenshot of reference qualifier and script include ? and once you click on the variable what are you getting ?

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

Hi Swathi, thank you for your response. The checkbox variable is not in a variable set, it's just a variable on a record producer that is underneath a Label type variable.

 

I have tried running this without any variable attributes listed on the variable. I have tried the script include accessible from all scopes, with client callable and without. These files and the record producer they are supposed to be impacted are all in the same scoped application.

reference_qual.pngscript_include.png

Hi @Izzy B1 ,

 

As i can see your script include is active false can you make it active true and add some gs.info('') in both if else and let me know what you are getting,

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

Hello Swathi,
You're right. I deactivated it because I was trying to find another solution. Unfortunately even with the recommended changes, the gs.info doesn't produce anything. As far as I can tell, the reference qualifier call didn't work and the script include didn't run.
Thanks for your assistance.