LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
快乐创新

Please add keywords searching feature in local variable table

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

Hi, everyone.

  i am trouble in developing using labview,i just only use mouse to select local variable option afeter i have created many them in  block diagram. as following shortscreen. so i take a suggetstion to add keywords searching bar on local varible table. if it true, it can help user quick select local variable option, and this feature can also use for global variable.

none searching bar.jpg

 

 

无标题.jpg

 

8 Comments
altenbach
Knight of NI

I think if you have that many local variables, you also have other problems. Is what you are showing really actual code? Obviously, it is full of potential race conditions due to the blatant overuse of local variables. For example why are you not wiring to the actual terminals which are right there, sitting bored and disconnected? Why are you reading from a terminal inside the case structure and from a local variable of the same terminal in parallel? Just wire to the terminal and branch the wire!

 

Do you really have multiple controls with the same label? That makes using local variables very dangerous! How do you know you are selecting the right entry? (Use the caption to show the same text on the front panel. The label should be unique for each) 

 

The size of the popup depends on the number of controls and indicators. You can lower the number of entries in the popup by using more complex datatypes, such as clusters and arrays. They do wonders for creating cleaner code.

 

Selecting from the shown popup is a very rare operation and it means that you are either changing an existing local variable to point to a different control or you started out with a generic local variable from the structures menu. Both of these scenarios are not common.

 

More typically, we just right-click a control or indicator and select "create...local variable". If we need more than one, we can ctrl-drag an existing local variable to create another copy.

 

All that said, if we have a large UI VI that has many controls and indicators, the selection menu gets a bit out of hand so I agree with the general idea. Fortunately, the entries are sorted. Not sure what a good solution would be or if we even need one. I never use that menu so I won't vote.

快乐创新
Member

Hi, i guess you will agree this purpose which add search bar in cluster option.

searchbar.jpg

AristosQueue (NI)
NI Employee (retired)

I agree with Altenbach -- if your code gets to the point where this is an issue, you have a bigger problem. I would worry greatly about your code. 

 

Even so, making the list searchable would not be a high priority for me. Creating the needed local variable directly from the control or FP terminal that is needed covers the vast majority use case.

 

The idea is doable, so I'll leave it open in case it gets lots of kudos, but I would not expect any changes here. That's my personal opinion.

X.
Trusted Enthusiast
Trusted Enthusiast

No matter whether the OP has a problem or not, all long pull-down lists should have a scrollbar...

快乐创新
Member

thanks for your comment. but scrollar option is lesss than searchbar,because user can remmber that items which them has created.

altenbach
Knight of NI
If a search box is added, it should act similarly to the item search in the event configuration, just displaying items that match the pattern. And yes, without scrollbars, these pop-ups become unusable.

It could also be made hierarchical. If there is more than on entry starting with the same character/string, it could show an entry with only that string followed by ... , and open a sub dialog with the actual entries if clicked.

Maybe there should be a real dialog instead, if people really want that functionality. These pop-ups only work for a handful entries or less.

Still, as i said, I never saw any use for all this.
tst
Knight of NI Knight of NI
Knight of NI

Regardless of my thoughts on the idea, here are a couple of things you can already do today:

 

  1. Click letters when the list is open. This doesn't filter, but it does jump to the relevant item.
  2. Write a Quick Drop or right click plugin to show a dialog where you can do this filtering. This will require launching the dialog, but might be worth it for you. You will need to use something like the traverse VI to get all the controls on the FP.

___________________
Try to take over the world!
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.