If the database field is 'date_stop_extended', to acess the data I use
How can I check for a null value on that same field?
Here's my example:
Thanks for the help!!
It is by design that if a date is null, it writes the current date to the database. You can override this behavior though.
If you select operator’s properties you would see a check box called “Display null values” like below.
When it is checked it is going to generate another array of values named “NullFieldFlags”.
From the PAM documentation
An array of ValueMaps. The fields of each ValueMap correspond to the fields in rows. The value of each field is either true. The corresponding value in rows is null, or false otherwise. This output only displays if Display null values is selected.
In Simple words:
It is an array of valuemap filled with Booleans. A value of true means that corresponding value in the results no matter what is in the results, the value is null in the database. Like shown below that the date has the Boolean true while name has false. That means date field is null is the database.
Process[OpName].QueryResults.date_stop_extended.length == 0
Thanks for the help Lindsay! When the date is null I am getting the current timestamp in the results so the length is never 0. Do I need to do something different?
I appreciate your help. I do understand all of what you are saying. I had 'NullFieldFlags' checked and I saw the 'true' value. I guess I'm not wording my question correctly so let me try again!
When I want to check the value of the database field, I use this:
I want to check first to see if this field is null, so how do I format the name for the null value in the NullFieldsFlags array?
I figured it was something like this:
I'm thinking this is obvious to most people so please forgive my ignorance, but I cannot see how to do this!
My apologies. I came at this from the middle instead of starting at the beginning. :-)
The syntax should look something like this:
A little trick in Process Automation, if you run the process and then find the value you are trying to reference in the dataset, right click on it and select "View Expression" to see the proper syntax for referring to that value in future runs of the process.
Hooray, it works! Just what I was looking for! I really appreciate that and thanks for revealing the trick on looking at the syntax. That hint is incredibly helpful!
Retrieving data ...