cancel
Showing results for 
Search instead for 
Did you mean: 

BLS nullnumber assignment

lawrence_prinsloo
Participant
0 Kudos

Hi, I'm having difficulty assigning a nullnumber to a transaction's local property.

First I generate a local propery xml document. I then need to do a calculation with the content of this xml file. If one of the inputs to the calculation is a "" or NA, then I want the output to be a nullnumber ie: NA.

This logic is done using:

if(

Local.ReturnedDocXML{/Rowsets/Rowset/Row[./SubItem=="#Local.Rpt_ClosingStock_Measured#"]/Pt} !="NA"

and

Local.ReturnedDocXML{/Rowsets/Rowset/Row[./SubItem=="#Local.Rpt_ClosingStock_Measured#"]/Pt} !="",

Local.ReturnedDocXML{/Rowsets/Rowset/Row[./SubItem=="#Local.Rpt_ClosingStock_Measured#"]/Pt}

-

Local.ReturnedDocXML{/Rowsets/Rowset/Row[./SubItem=="#Local.Rpt_ClosingStock_System#"]/Pt} ,

nullnumber )

The output of this logic is assigned to a local property of type double. If the condition occurs where the value should be a nullnumber, the local property gets a value of 0. If I have a tracer action block with the same logic in the message link, the output is the NA as expected. However the local property's value is still 0.

Any ideas about this. I'm assuming that nullnumber is not shown as a 0. It's normally a "---" in the grid or an NA or "" in the xml output from what I can remember.

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Lawrence,

If I'm not mistaken the nullnumber and datatype specific 'null' expressions are only valid in the IllumDoc related actions like the Row and DataItem for emulating a database null effect in a resultset, which would have the special display behavior in the iGrid that you are looking for.

The Local property is getting 0 because it is the 'min' value the object can be.

Regards,

Jeremy

lawrence_prinsloo
Participant
0 Kudos

Hi Jeremy,

thanks. So how would I assign a NULL value to the Transaction Property? If I use "", then the property takes on a 0. I now understand why. Would an adequate work around be to make the min value blank?

Thanks again for the feedback, at least now I understand why I'm getting what I'm getting.

jcgood25
Active Contributor
0 Kudos

You can't assign the null value to a TRX property, as all numerical properties will default to their effective minimum. The null functions in the link editor are only intended for the IllumDoc data value elements to emulate the behavior of a straight query results and the null response from the data source. Even though I always prefer to keep data types consistent, maybe this would be a good place to use a string data type and manage the Local property being "" as a null in your logic. A little messy of course, but it is what it is I guess.

Regards,

Jeremy

jcgood25
Active Contributor
0 Kudos

If you create an IllumDoc instead of using Local.ReturnedDocXML to hold your Rowsets/Rowset/Row, then you can handle your logic in the assignment at either the Row action or the DataItem action

Answers (1)

Answers (1)

lawrence_prinsloo
Participant
0 Kudos

Thanks.

I've done quite a bit of development already. What I think I'll do is make the property's min value -99999 and use that as a flag for a null. Hopefully that should do it.

Thanks again for the help.