Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

CHOOSE returns 0 instead of "Text"

I'm using a CHOOSE function to lookup a value and display a replacement numeric or text value from the list.  When the output is a number, it works fine.  If the output is quoted text, it returns 0 instead of the quoted text.
 
Example1:  CHOOSE(value,0,1,2,3,4,5,6,7)          This works normally and returns the appropriate numeral, depending on the value term.
 
Example2:  CHOOSE(value,0,1,2,"Normal",4,"Too Big",6,"Overload")  This works fine, except when the 4th, 6th, or 8th term is to be displayed, it ruturns a 0 (zero) instead of the text.
 
Am I using the wrong function for this?  The Help file seems to indicate that this should work.
 
I'm using Lookout 6.0.2 running on Windows XP, SP2.
 
0 Kudos
Message 1 of 4
(3,673 Views)

There are 3 separate functions. LCHOOSE for logical items, NCHOOSE for numeric items and TCHOOSE for text items.

Bob

0 Kudos
Message 2 of 4
(3,669 Views)

I'm aware of nchoose and tchoose.  The help file indicates that they are no longer needed and that they are still usable but not necessary.  I tried tchoose and it didn't help, but I believe I've found the solution.

In the window used for editing the function, there is a drop-down box that normally displays the word "default".  If this is changed to "text" just before saving the completed line, the function works properly for quoted text output.  Once the save has taken place, this box is greyed out and cant be changed.

 

0 Kudos
Message 3 of 4
(3,667 Views)
We suggest you to create an Expression Object, and in Object Explorer, right click and drag it onto the panel, then to choose the display type.
Ryan Shi
National Instruments
0 Kudos
Message 4 of 4
(3,660 Views)