Flow designer custom action script include

ClareM
Tera Expert

Hi,

 

I've created a custom action to call a script include and I can see that the values are being retrieved correctly in the log msg however the glide record query in the script include appears to be failing and I am wondering if there is an issue with the data types.

 

Any advice would be greatly appreciated!

 

Script include configuration: Credit_limit field is String but holds a decimal value due to catalog client script converting to decimal value to Fixed(2). Terms of Payment is Choice and is a lookup select box field - lookup from Payment Terms table

ClareM_0-1697096719397.png

Action inputs 

ClareM_1-1697097172294.png

Action script 

ClareM_2-1697097280639.png

Script include

ClareM_4-1697097459807.png

 

The highlighted log messages are generated as applicable however a record is not being found which suggests the queries within the if statements are not working

 

The field types of the Value above and Value below fields are both decimal. The Payment terms field is a reference field referencing the Payment Terms table.

 

The log message shows that the values are being retrieved correctly

ClareM_5-1697097603552.png

I wondered if there is an issue with the data types and if so how to resolve this?

Many thanks

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@ClareM Did you try executing the same encoded query on table u_customer_credit_authority_matrix on the backend view using a background script? Please check if the same query is returning any results using a background script. 

Vishal Birajdar
Giga Sage

Hi @ClareM 

 

In script include, after line no. 22  put this log to check what query you are getting.

 

gs.log("My Encoded Query=" + amGR.getEncodedQuery() );

 

Copy the query you get in log's & paste in URL list view of table & check if there is any record available with that query.

e.g., 

VishalBirajdar_0-1697099096382.png

 

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates