11-17-2024 05:19 AM
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
Solved! Go to Solution.
11-17-2024 06:34 AM
Are you looking at the variant output? Or what else do you exactly mean?
11-17-2024 07:30 AM
yes, the variant output
I'm trying to display the data without that Value -> prefix in front
11-17-2024 10:32 AM - edited 11-17-2024 10:44 AM
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:
Of course a variant can contain may different datatypes. You need to know what it is.
11-17-2024 10:43 AM - edited 11-17-2024 10:44 AM
following your advice, I'm now using Database variant to data and a 2D string array and it works as it should
thanks 🙂