There are no NULL values in NAV, so if you want to signify that a decimal is undefined rather than 0, you'll have to do that with an extra boolean or something similar.
Why do you need all this when you can use the existing property called BlankZero?
ZERO != NULL. Undefined has a completely different meaning than 0. 0 has a significance, Null means you don't know or that something is not applicable.
As stated above, there is no NULL value for anything. You can do a work around in this case, though. You can start with a blank or empty string which will represent your NULL value. You can then assign that string a formatted value, like FORMAT(Your Number) so that you know it actually received a value. If it is blank, then it is still "NULL". If you need to convert that string back to a number you can use EVALUATE.
You can even make an IsNull function that takes in a string and returns true if it is blank (NULL) so that you can understand your code better.
A boolean that holds whether or not the number has been assigned to work as well, though.
-matrix- ment to show a blank space instead of some number.
Not 'some number' but 'not default number zero', so therefore BlankZero was the right choice all along. Mohana was the only person that actually understood what the OP was asking for.
-matrix- said that he wants to assign a certain value to a decimal, given a certain condition is met. That assigned value should be blank and should not be zero. He does not say anything about the case when this condition is not met. So we must assume the decimal can have any decimal value then, including zero. If we use BlankZero, even those will not print, even though the condition is not met.
A common application of this scenario is showing a percental change. If no change happened, the value is 0 %. If the value you define to be the base (100%) is 0, your result is undefined. So you should show some sensible indication for this condition. I believe showing a blank in this situation is a well choice, but showing blank for no change is not that good.
@vaprog: You are reading too much into Matrix's first post. Their English might not be as good as yours, they probably never meant as much as you seem to read into the question. Look at the first post, then look at Matrix's reaction to later posts. Try to see what they wanted to ask, and see which reply answered the question for them.
You are insisting on the full meaning of the correctness within the words that were posted, and you do not seem to want to try to understand what the OP wanted, which clearly was not as elaborate as what you are talking about. This is not a theoretical discussion about what might or might not be meant when using certain words in a certain context. The OP asked a question, and the BlankZero property was clearly what they wanted to know about. It doesn't matter what other meaning their words might have. The original question was understood and answered by Mohana, there simply was no further meaning in the OP.
You can disagree all you want, and technically there's merit to what you are saying, but in this case you are always going to be wrong
I found this forum, and sound interesting which indicate have similar prob with me.
For me, I need to not show the 0 if it doesn't have anything follow/related.
For example :
Part No Description QTY Unit UnitPrice Total
P001 Coverhead 2 PCS 0 0
PO#C00123 0 0
1 Months 0 0
The zero (0) on 2nd and 3rd line will dissapear, but on 1st line still show there. How I make it?
Anyone can help me?
Thx
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
You can even make an IsNull function that takes in a string and returns true if it is blank (NULL) so that you can understand your code better.
A boolean that holds whether or not the number has been assigned to work as well, though.
if the goal is just not to show 0 value decimals in a report or form then "BlankZero" is an easy solution.
if the goal is a "blank value", a decimal can't have a blank value and you will have format over to a text type.
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
We all assumed, though, that by -matrix- ment to show a blank space instead of some number.
RIS Plus, LLC
-matrix- said that he wants to assign a certain value to a decimal, given a certain condition is met. That assigned value should be blank and should not be zero. He does not say anything about the case when this condition is not met. So we must assume the decimal can have any decimal value then, including zero. If we use BlankZero, even those will not print, even though the condition is not met.
A common application of this scenario is showing a percental change. If no change happened, the value is 0 %. If the value you define to be the base (100%) is 0, your result is undefined. So you should show some sensible indication for this condition. I believe showing a blank in this situation is a well choice, but showing blank for no change is not that good.
You are insisting on the full meaning of the correctness within the words that were posted, and you do not seem to want to try to understand what the OP wanted, which clearly was not as elaborate as what you are talking about. This is not a theoretical discussion about what might or might not be meant when using certain words in a certain context. The OP asked a question, and the BlankZero property was clearly what they wanted to know about. It doesn't matter what other meaning their words might have. The original question was understood and answered by Mohana, there simply was no further meaning in the OP.
You can disagree all you want, and technically there's merit to what you are saying, but in this case you are always going to be wrong
RIS Plus, LLC
For me, I need to not show the 0 if it doesn't have anything follow/related.
For example :
Part No Description QTY Unit UnitPrice Total
P001 Coverhead 2 PCS 0 0
PO#C00123 0 0
1 Months 0 0
The zero (0) on 2nd and 3rd line will dissapear, but on 1st line still show there. How I make it?
Anyone can help me?
Thx