LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to best indicate a missing value in a numeric indicator

Hello,

 

I am looking for a possibility to indicate a missing value in a numeric indicator.

 

There are situations where a data value could not have been measured/read from file/calculated and this should be communicated to the user in a most obvious way.

 

Personally, I would prefer to have the possibility to display some hyphens "----" to indicate a missing value. I found no way to do so, however, as it would require a string control. (Interestingly, numeric controls can display text, Inf or Nan)

 

Right now I set the text color to white / black if a value does (not) exist.

 

I was considering an overlay of numeric and string control but this makes life complicated if the numeric indicator is changed to a normal control with increment/decrement buttons because then one has to also take care of the z-plane position.

 

Displaying -1 or some other numeric value is not always useful because sometimes all numeric values are allowed/possible.

 

Are you aware of any other suitable approach?

 

Thanks,

 

Wolfgang

 

0 Kudos
Message 1 of 8
(3,410 Views)

What if you colored the text font the same as the background color of the control?  In that case, the control would appear to be completely blank.  You might have to swallow left click events in the control callback to keep the user from highlighting the text which would make it readable.  Just a thought.

Message 2 of 8
(3,402 Views)

If the user needs the value of the invalid reading (as a hint) in order to make it valid again, then it may not be a good idea to make the text invisible.

 

If it was not possible at all to get a reading, or if there was a calculation error so that displaying a value is worse (since it will be misleading) than not displaying one, then it may be wise to make it disappear.

 

You may change the numeric to a string and always display the values as strings.

In the case of a problem, you can directly display the word "Error".

 

How does that sound?

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 8
(3,401 Views)

Hi Todd,

 

You raise a good point: I should better use the background color instead of an assumed value of white...

 

Hi Eren,

 

I prefer to keep the numeric controls: If the values exist / are valid, the indicator might be set to normal allowing users to change the displayed value with the up/down arrows: Imagine a popup table for previewing a configuration file: Some values might not be present in the file, then they should somehow be marked as missing. If they do exist, it might make sense to allow modifying them before further use...

 

Thanks for your input,

Wolfgang

 

 

0 Kudos
Message 4 of 8
(3,392 Views)

Another idea I had is you can set the font in the control to strikethrough.  Maybe not as good as using -----, but 0.0000 may still get the message across.

 

You could also try to set your font to Webdings, which I think is standard on all versions of Windows nowadays.  The '0' (zero) character kind of looks like a hyphen, so you could set the font to Webdings and the control value to 0 and it could look kind of like what you want.  Problem is that you have to get rid of any non-zero character (no +/-, E, or . allowed) and possibly turn on padding to get more than one dash.  Here's what one looks like displaying '00000':

Numeric with Webdings

0 Kudos
Message 5 of 8
(3,384 Views)

Thank you for your thoughts and efforts...

 

Right now I am using 'blank' entries by setting the text color of each individual table cell to the background color, or back to visible using the 'default' text color.

0 Kudos
Message 6 of 8
(3,373 Views)

A simple alternative could be to set the controls in validation mode and set empty fields to a out-of-range value: controls will automatically be borded with a red pattern. ValidatePanel () will also permit you to detect that the operator hasn't set all necessary controls to a reasonable value.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 8
(3,371 Views)

Thank you, Roberto, for contributing this idea!

 

It is a welcome addition to the collection in this thread Smiley Wink

 

However, I think that it may not work in general because the missing value might well be a parameter/result from/for a calculation and thus could be very large. In the GUI I have set the minimum/maximum value to +/- Inf, accordingly.

 


Displaying -1 or some other numeric value is not always useful because sometimes all numeric values are allowed/possible.


0 Kudos
Message 8 of 8
(3,367 Views)