HOW TO: Use handlebars to return the length of a string
You can use the {{compare}} handlebar function to check the length of a string using in your HTTP body. Here is an example:
{{#compare phone.length "===" 10}}{{phone}}{{else}}Field length does not meet requirements{{/compare}}
If you are using NetSuite SuiteScript, any data coming out of that is converted into strings. Currently, you cannot check the length of numeric fields.
0
Comments
Please sign in to leave a comment.