LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Value-> prefix from array

Solved!
Go to solution

Hi All,

 

New to the forum and relatively new to LV as well.

I'm trying to get some data from an SQL DB and all is well but in my array I get he prefix Value -> in every cell in front of my actual data. This data des not come from my database so I assume it's added in LV by default. I can't find an easy way to remove this and before I start to filter the string, which will complicate the code, I just wanted to check if there is an easy way to remove the prefix.

Much appreciated 

0 Kudos
Message 1 of 5
(231 Views)

Are you looking at the variant output? Or what else do you exactly mean? 

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(219 Views)

yes, the variant output 

I'm trying to display the data without that Value -> prefix in front

0 Kudos
Message 3 of 5
(210 Views)
Solution
Accepted by gabriel86

If you have a variant, you would use "variant to data", assuming you know the datatype.

 

(It typically helps to show some code, especially if you use generic terms such as "cell"  or "prefix value". That can mean so many different things.)

 

For example if you know that the variant contains a 1D array of strings, you can recover it as follows:

 

altenbach_0-1731861584227.png

 

 

Of course a variant can contain may different datatypes. You need to know what it is.

Message 4 of 5
(190 Views)

following your advice, I'm now using Database variant to data and a 2D string array and it works as it should

thanks 🙂 

0 Kudos
Message 5 of 5
(182 Views)