LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pre-populate popups

Is there a way to "prepopulate" a popup to the user?  I query the user for 6 different values using "prompt user " express.vi.  At the end of the 6th query I display the values the user put in and ask if they are correct.  As of now if he/she hits yes the vi ends and continues on in the main program.  If he/she hits no the subvi repeats itself and asks for all 6 values again.  The user has requested that I "pre-populate" each popup and the user just hits OK for each individual popup if that value is correct.  Conversely they enter the wrong values then hit OK.  Can't figure out how to have zero in for the 1st time thru the subvi and then the pre populated values in if the user hits no.

0 Kudos
Message 1 of 10
(3,952 Views)

Please post the VI you have already developed (as a .vi or a LabVIEW snippet, please) -- it will save us a lot of our time (which you get for free) ...

 

Bob Schor

0 Kudos
Message 2 of 10
(3,948 Views)

here ya go...and thanks.

0 Kudos
Message 3 of 10
(3,932 Views)

Hi Clint1000,

 

After doing some digging, it looks like that behavior is possible but would probably be more trouble than it's worth. Because you are using the default 'Prompt User for Input' Express-VI, you would need to customize each VI for each prompt, so 6 individualized VIs. In order for the new values to display when it's opened, you could save the values the user inputs to be default for that control so the next time it opens, it would display that value. If you want to do that, this article discusses how you could do that: http://digital.ni.com/public.nsf/allkb/6AE789BED0E8161E862571E60069F9BB

 

Then the next time the loop ran, the defualy value would be in the control. However, this may be a lot of work just to avoid having the user input 5 numbers again.

 

Hope this helps,

 

Austin H.
Chief Product Manager
Test Software
0 Kudos
Message 4 of 10
(3,862 Views)

I would say it is simpler to edit "Prompt User for Input" VI - open front panel, save it as a custom VI. Assign input controls to connection pane - make them real inputs for the subVI. Then you can connect anything you want to the inputs - VI will open with these values.

Note: It is easier to join values into cluster - 2 connections instead of 12.

In the main program save them manually. If you need to keep these values between runs - ini file, otherwise - shift register.

imho saving variable values as default within VI - bad idea.

0 Kudos
Message 5 of 10
(3,838 Views)

So from the 2 posts the consensus is it’s a bad idea for whatever reason to have the fields populated if the user choses "No" when asked if the info is correct? Just wanted to make sure I wasn't missing something. Could have sworn I saw something like this as an example vi..guess not.

Thanks..

0 Kudos
Message 6 of 10
(3,816 Views)

Having control over initial values for the dialog is a good style and common task.

I have not tried to store them right in the dialog vi (as ahillinaustin suggests), may be this is why I think this is a bad idea.

*For example I doubt it will work in the executable - you need to save VI with new values for the next run.

0 Kudos
Message 7 of 10
(3,791 Views)
To Make any VI pop-up style, set Property Node FP.OPEN at the beginning and the end Make a while loop that ends when you click on your buttons (OK,CANCEL). How to set Property Node: CTRL+Spacebar to search through Quick Drop on Block Diagram STATIC VI REFERENCE PROPERTY NODE Click prop node and choose FRONT PANEL WINDOW Then you don't have to be constrained to the express VI.
0 Kudos
Message 8 of 10
(3,775 Views)

Instead of a bunch of popups (annoying) why not just make one vi that has six data entry controls with one "OK" button.

 

You can put the default values or zero in the controls.

 

Then use the same conformation popup vi you have.

 

Also you can get rid of all the flat sequences and your program will still run the same due to LabVIEW's data flow.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 10
(3,770 Views)

writting a custom vi was my next approach.  I was trying to save time by using express vis..

Thanks.

0 Kudos
Message 10 of 10
(3,762 Views)