LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
GregFreeman

concatenate string to array of strings

Status: New

Right now, when you wire up an array to "concatenate strings" it concatenates all the arrays strings. I'm not saying this funcitonality should go away, but I propose an option you could select from right clicking on the concatenate string function which would allow a string to be concatenated to every element in the array. Right now the only way to do this is with a for loop on the block diagarm, and it would be nice if it was handled by the node itself.

 

 

 

 

 

6 Comments
AristosQueue (NI)
NI Employee (retired)

Just put a For Loop around the node. We have had discussions on the forums before about the value of adding modes to nodes that do nothing more than imply a loop, and for the most part, such modes have been seen as not adding much value.

GregFreeman
Trusted Enthusiast

That's what I have been doing :(. I just feel this is a case where the input of an array to concatenate strings is going through a loop inside the node already, and this isn't much extra functionality to add on to that. But, that being said, obviously the forum goers agree with you as is shown by the limited amount of kudos! So, I will just continue with my subVIs (or maybe learn to write xnodes!)

X.
Trusted Enthusiast
Trusted Enthusiast

I removed my kudo because I realized that the suggested implementation would most likely diminish code legibility, in contrast to a for loop. This being said, you can paint your for loop transparent 🙂

 

ScreenHunter_001.jpg

Broken_Arrow
Active Participant

Would this not be a backwards compatibility issue?

Richard






AristosQueue (NI)
NI Employee (retired)

> Would this not be a backwards compatibility issue?

 

No. We would implement this functionality as an alternate mode on the node. Like Build Array can do either build or concatenate.

GregFreeman
Trusted Enthusiast

No. We would implement this functionality as an alternate mode on the node. Like Build Array can do either build or concatenate.


 

Broken, the example AQ provided is is what I was getting at when I said "right clicking on the concatenate string function which would allow a string to be concatenated to every element in the array" but I should have been clear with an example like AQ posted. I realized after rereading I probably wasn't specific enough. This would also take care of the issue X is stating because the appearance of the xnode would slightly change like it does with build array when concatenate is selected.