Jump to content
Reddime

Extra Data Field Null Check

Recommended Posts

Hey guys,

I'm sure this is probably a common issue, but I haven't been able to find much on it.

I'm writing a script to check an EDF for a value.  If it is Null, then I Generate a Random Password and store it in the EDF.

The problem is that I haven't found a way to check for a Null value.

I'm currently using a "Variable Check" against the variable that I stored my EDF in, with a blank compare field, but the test passes and the script continues as if it matched.

My script debugger does show the variable as empty.

 

image.thumb.png.91913aa45bb83b74e00ab66462e1f2c9.png

Share this post


Link to post
Share on other sites

1: Set the EDF to have a default value. (Click in it, hit space and backspace, then save)

2: In your script, retrieve the EDF. Check if the value = or Not = (blank, just leave the second part empty)

If you haven’t set a default, the unassigned value is undefined.  If you set it to be blank as default, it WILL be blank if it hasn’t been set. 

  • Like 1

Share this post


Link to post
Share on other sites
On 4/20/2019 at 9:25 PM, DarrenWhite99 said:

1: Set the EDF to have a default value. Click in it, hit space and backspace, then save.

2: In your script, retrieve the EDF. Check if the value = or Not = (blank, just leave the second part empty)

If you haven’t set a default, the unassigned value is undefined.  If you set it to be blank as default, it WILL be blank if it hasn’t been set. 

Thanks, I'll give that a shot this afternoon.

Share this post


Link to post
Share on other sites
On 4/20/2019 at 9:25 PM, DarrenWhite99 said:

1: Set the EDF to have a default value. Click in it, hit space and backspace, then save.

2: In your script, retrieve the EDF. Check if the value = or Not = (blank, just leave the second part empty)

If you haven’t set a default, the unassigned value is undefined.  If you set it to be blank as default, it WILL be blank if it hasn’t been set. 

This was the answer.  I hadn't set the default value of the EDF thinking I would be able to NULL check it.  Too bad Automate support couldn't tell me this. :P 

Edited by Reddime

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...