Not able to call a script include in the filter conditions in the trigger condition flow designer.

Community Alums
Not applicable

Hi all,

We want to use a dynamic condition in the trigger condition of a flow designer. We have made a script include and want to call the same in the trigger condition.

Below is the one that we are using. For the first condition, it is working absolutely fine. The moment we are calling the script include, it's not working.

image

Note: We have tried using the same method in the filter conditions of reports, and there it's working absolutely fine. But here, in flow designer it's not working.

 

Regards,

Sudhangshu Das

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi Anil,

We have tried it again, and it's working. This is what we used:

image

Here, what's happening is,

We want to receive notifications according to this filter condition.

But what's happening is, when we are using just the above two conditions, it is triggering the notification. 

But, the moment we are using the third condition, even though we are getting the correct record in the filter, somehow it is not triggering the notification.

 

Thanks & Regards,

Sudhangshu Das

View solution in original post

14 REPLIES 14

Can you please share what your script include contains and what it returns.

I did something like this:

find_real_file.png

 

And our script include is like below:

var XYZ= Class.create();
XYZ.prototype = {
    initialize: function() {
		
    },
	getRefQual:function(itemId){
		gs.info('Item is '+JSON.stringify(itemId));
		return 'admin';
	},

    type: 'XYZ'
};

The result is like below:

find_real_file.png

Thanks,

Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Community Alums
Not applicable

Hi Anil,

Please look at the script include below.

image

This is returning us the current result number from the scan_result table.

We have tried calling the same script include in one of the report conditions, and it is working perfectly there.

 

Thanks,

Sudhangshu Das

Hi,

As Shubham has suggested convert your script include into a Class. You have created classless script include which may not work in this scenarao.

 

Create new script include and add this function in newly created script include and call it using the way suggested previously.

 

Thanks,

Anil Lande 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Community Alums
Not applicable

Hi Anil,

We have tried using the way you have done it, but for some reason, it is not working for us.

image

This is the script include that we have written.

And we have tried calling it using:

javascript: new getdeveloper().getLastResultDeveloperSuite();

Can you identify what can be the issue?

 

Anyways, thanks for the reply.

 

Regards,

Sudhangshu Das

Community Alums
Not applicable

Hi Anil,

We have tried it again, and it's working. This is what we used:

image

Here, what's happening is,

We want to receive notifications according to this filter condition.

But what's happening is, when we are using just the above two conditions, it is triggering the notification. 

But, the moment we are using the third condition, even though we are getting the correct record in the filter, somehow it is not triggering the notification.

 

Thanks & Regards,

Sudhangshu Das