The CreatorCon Call for Content is officially open! Get started here.

Can we call script include in condition builder

Aruna Sree Yela
Tera Guru

Can we call script include in condition builder of Widget instance.

 

I want to pass array of users(from Script include) to 'created by' field in the widget instance. Please provide me the syntax on how to write it.

 

Script Include name: mySI

function name: myFun()

ArunaSreeYela_0-1724324443675.png

 

 

Thanks

 

4 REPLIES 4

Saiganeshraja
Kilo Sage
  javascript: new scriptinclude().functionname(anyparameters);

 

 

In your case: 

javascript: new  mySI().myFun();





 

Mark correct and helpful.

Sandeep Rajput
Tera Patron
Tera Patron

@Aruna Sree Yela Yes, you can call the script include method from the condition builder.

 

Here is how you should call it.

javascript: new mySI().myFun();

 

Hi @Sandeep Rajput @Saiganeshraja , thanks for the responses

 

But I'm getting null values in the condition, Am I returning it correctly?

 

usersArray.push(gr2.user_name.toString());
return usersArray;

 

 

ArunaSreeYela_0-1724342019905.png

 

ArunaSreeYela_1-1724342066413.png

 

 

Note: When I call script include in Background script I'm getting the array values

 

Thanks

@Aruna Sree Yela Try the following and see if it works.

 

usersArray.push(gr2.user_name.toString());
return usersArray.toString();