Flow designer custom action script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:01 AM - edited 10-12-2023 01:10 AM
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
Action inputs
Action script
Script include
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
I wondered if there is an issue with the data types and if so how to resolve this?
Many thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:09 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:25 AM
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.,
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates