I am trying to fast-track a ticket when the value of a custom field is 0 or blank. I'm trying to use the script runner post function. I tried the followings and it didn't work for me
cfValues['Amount (Total Program)'] == '0' (this is for when value is 0)
cfValues['Amount (Total Program'] == '' (this is for when value is empty)
cfValues['Amount (Total Program'] == 'null' (this is for when value is empty)
Thank you!
Hello,
I believe you might just be checking for strings in your field based on your examples. By putting single quotes around null, you're causing the field to look for the string 'null' instead of a null value.
Try this:
cfValues['Amount (Total Program)'] == null
Or, if you want to check for a number (assuming this is a number field, not a text field), this:
cfValues['Amount (Total Program)'] == 0
Let me know if this helps,
Jenna
Hi Jenna,
Thank you for your advice. It worked!! :)
Have a good day!
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which condition did not work? for null values you can check like this
if (cfValues['Amount (Total Program'])
or
if (cfValues['Amount (Total Program'] == null)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried
cfValues['Amount (Total Program'] == 'null' and that did not work. I double check and this field was empty. Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.