Prompting user input in LabVIEW
We've written a number of VIs that require user input, and we'd like for the user to be able to begin typing right away, rather than having to use the mouse or the Tab key to move the cursor to the first text field. What's a good way of doing this? Thank you very much.
-Dan
You can use the KeyFocus property node. On the block diagram, right click
on the control and add a property node. Right click on the lower part of
the node and change the property to KeyFocus. Wire a True boolean to the
property.
"Arrington" wrote in message
news:[email protected]..
> We've written a number of VIs that require user input, and we'd like
> for the user to be able to begin typing right away, rather than having
> to use the mouse or the Tab key to move the cursor to the first text
> field. What's a good way of doing this? Thank you very much.
> -Dan
>
Similar Messages
-
Creating Drop Down or Option selection for prompt user input.
Hello,
I wanted to know how can I create a drop down menu that has predefined values? I have the prompt user input vi. When it says enter voltage..i want the user should be able to select from a drop down menu values..also is it possible to have a predefined set of values from which a user can select...say 5 values are displayed and user selects one of them each time the vi is run...can this be realized..kindly help.
Thanks.
RaviHi Ravi,
you can use a text ring or a menu ring control located on the Ring and Enum on the control pallete.
for a pre defined value you can edit that control to have what ever values you want from the user to input.
You can change the menu option by right clicking on the ring control and choosing Edit items from the list and use the values you want.
Regards,
Nitin -
How to specify user input?
I know how to use the Keyboard class to prompt user input, but if I want to create custom user arrays, can anyone help me go about how to do it?
I want the user to be able to specify an array between 100 and 200 characters ins ize, and I'd create an array like that according to the user input...I don't have a clue how I'd even begin this though...Please help.If I understand correctly: take user input as an int and create an array of that size? if so:
int size = parseInt( args[0] );
ObjectName nameOfArray[] = new ObjectName[size];
args is (almost) always a string array so you need to extract the int value (parse it). that simple :) -
HOW DO I CHANGE THE FONT OF "Message to Display" IN THE Prompt User for Input
Hi,
HOW DO I CHANGE THE FONT OF "Message to Display" IN THE Prompt User for Input?
Thanks for your help
XNRight click and select Open front panel >> Convert.
Change the vi as you need. then you can save it as a normal sub-vi.
If you have Labview 8.6, maybe (i am not sure) you can edit the express vi. Express vis are supported in 8.6 -
Increasing max # of inputs on prompt for user input
Hi
I would like to increase the number of inputs beyond 10 available on the prompt user for input function. At the moment I am using 9 of the 10 available inputs each running a subVI from a case structure. I seem to be limited to 10 inputs using the prompt user for input function so is there another way of prompting the user to select from >10 inputs preferably 20.
Thanks for any help
Chris
Solved!
Go to Solution.
Attachments:
WASP dialog.vi 57 KBYou can always write you own dialog with as many selections as you like.
Right-click the express VI and "open front panel" This will convert it to a VI that you can edit in any way you want. save it under a new name.
You might even want to add some validation code, e.g. to make sure that no more than 2 boxes are checked.
LabVIEW Champion . Do more with less code and in less time . -
User input prompt in CASE statement
I would like to obtain user input via a prompt and use what the user selects in my OBIEE Report case statement.
For example &START_DATE AND &END_DATE are user inputs:
CASE when SHIP_DATE BETWEEN &START_DATE AND &END_DATE THEN 1
ThanksUse presentation variables for start and end_dates
In the criteria tab->SHIP_DATE->click on fx
on Edit Column Formula->Bin Tab->
Add Bin->Add button->Variable->Presentation
Use the presenation variables with with required condition
Okay then set 1 at Edit Bin Name
Mark if helps
Srini VEERAVALLI on Feb 7, 2013 5:23 PM
Any updates on this?
Edited by: Srini VEERAVALLI on Feb 20, 2013 4:10 PM -
How to change date format of user input prompt in infoview.
Hi All,
Every report webi or deski having date field as prompt when viewed in view mode in infoview shows date format as M/d/yyyy h:mm:ss a.
Where this format is stored and how can we change it to dd/mm/yyyy.
Any ideas.
Regards,
GauravNot sure id this helps...
I was up against a similar issue of placing the user input dates, Starting & Ending, into one cell for a reference on each report header. After a few hours of diligence, I came up with a working model that finally worked:
u_StartDateAsTXT=FormatDate(ToDate(UserResponse("Enter Date/Time Shipped (Start):");"MM/dd/yyyy hh:mm:ss a");"MM/dd/yyyy")
and
u_EndDateAsTXT=FormatDate(ToDate(UserResponse("Enter Date/Time Shipped (END):");"MM/dd/yyyy hh:mm:ss a");"MM/dd/yyyy")
The report header has the following function:
=u_StartDateAsTXT + u201C u2013 u201C + u_EndDateAsTXT -
"catching" a prompt for user input and answering it through zenity?
I'm trying to write a script (or multiple scripts) that will allow me to use command-line only applications via user defined actions in my file manager without having to open a terminal. Now I realize this basic functionality is already available, but as it stands I am unable to respond to command-line prompts for user input without opening a terminal. Is it possible to write a shell script that would act as a wrapper and allow me to use zenity (or another popup program) to respond to such queries?
For example if I used a command-line program that prompted me for a password, could I "catch" that prompt with a shell script and answer it through another program, such as zenity?
Last edited by falconheart (2011-01-16 22:37:25)The easier way to do this is to collect the info with zenity first, then pass it on the command line. If the program insists on prompting, then you could try feeding it the info with redirection if it accepts it from stdin. For example
command < info.txt
where info.txt is a temp file created by your script which contains whatever you want entered into the prompts. This will work in some cases. -
Prompting for user input in nested select statements
I recently rewrote a query to use a nested select statement instead of specifying every SELECT field on the GROUP BY line. Here's the query which works perfectly with hard-coded values of '030', '01/01/11', and '12/31/11'.
SELECT T0.[CardName] AS Customer, T0.[CardCode] as 'Cust ID', T0.[Phone1] as Phone, T0.[CntctPrsn] as 'Contact Person', T0.[Address], T0.[City], T0.[State1] as State, T0.[ZipCode] as 'Zip Code', T0.[Country], T1.[TotalSales]
FROM OCRD T0
INNER JOIN
(SELECT I.[CardCode] AS CardCode, SUM(I.[DocTotal]) AS TotalSales
FROM OINV I
WHERE left (I.[CardCode], 3) = '030' AND (I.[DocDate] >= '01/01/11' AND I.[DocDate] <= '12/31/11')
GROUP BY I.[CardCode]) T1
ON T0.[CardCode] = T1.[CardCode]
ORDER BY T0.[CardName]
When I try to prompt for the left 3 characters of the CardCode (or the dates), ie.
WHERE left (I.[CardCode], 3) = [%0] AND (I.[DocDate] >= '01/01/11' AND I.[DocDate] <= '12/31/11')
I get an error "Column 'OCRD.CardName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause".
It's like putting a user variable in the inner SELECT made it part of the outer SELECT which is exactly what I was trying to avoid by re-writing this query with the inner SELECT.
Can anyone explain what SQL Server is doing here and how to fix it?Thanks Gordon. That's how I originally wrote the query and it works fine. But I was disturbed that I had to GROUP BY every field in my SELECT statement when I really only wanted to group by CardCode. So I did some research and came up with this where the inner select still groups by only CardCode and still takes user input. I don't really understand why you need the commented SELECT statements in the SET lines, but you do. Something about using real table fields for variables.
DECLARE @startDate datetime
DECLARE @endDate datetime
DECLARE @rep varchar(10)
SET @rep /* SELECT T0.[CardCode] FROM ORDR T0 WHERE T0.[CardCode] */ = '[%0]'
SET @startDate /* SELECT T0.[DocDate] FROM OINV T0 WHERE T0.[DocDate] */ = '[%1]'
SET @endDate /* SELECT T0.[DocDate] FROM OINV T0 WHERE T0.[DocDate] */ = '[%2]'
SELECT T0.[CardName] AS Customer, T0.[CardCode] as 'Cust ID', T0.[Phone1] as Phone, T0.[CntctPrsn] as 'Contact Person', T0.[Address], T0.[City], T0.[State1] as State, T0.[ZipCode] as 'Zip Code', T0.[Country], T1.[TotalSales]
FROM OCRD T0
INNER JOIN
(SELECT I.[CardCode] AS CardCode, SUM(I.[DocTotal]) AS TotalSales
FROM OINV I
WHERE left (I.[CardCode], 3) = @rep AND (I.[DocDate] >= @startDate AND I.[DocDate] <= @endDate)
GROUP BY I.[CardCode]) T1
ON T0.[CardCode] = T1.[CardCode]
ORDER BY T0.[CardName]
FOR BROWSE -
How to force sql developer to prompt for user input for every execution ?
Hi Folks,
Environment: Oracle 11g (on Windows 7)
SQL Developer: *3.1.07*
I am executing a PL/SQL code off Sql Developer. The code uses substitution variables to prompt user for input. However,I am only prompted for the user input for the very first run of the code. For the subsequent executions, the code simply picks up the user input from the very first run. This behavior persists for all subsequent runs of the code.
I have executed the same piece of code from SQL*PLUS and the behavior seems normal (i.e. I am prompted for fresh input for every execution)
How can flush out the old user input so I can be prompted for new user input for every run of the code in sql developer?
Thanks in advance
rogers42Hi Rogers42,
1/try
undefine
undefine fred
select '&&fred' from dual;
[run this multiple times]
[prompts gere]
old:select '&&fred' from dual
new:select 'a' from dual
'A'
a
[prompts here]
old:select '&&fred' from dual
new:select 'b' from dual
'B'
b
2/try
exit (requires recent version of sql developer: tools->preferences->Database->worksheet->Re-initialize on script exit command)
select '&&fred' from dual;
exit
run this multiple times
[prompts here]
old:select '&&fred' from dual
new:select 'x' from dual
'X'
x
Commit
[prompts here]
old:select '&&fred' from dual
new:select 'y' from dual
'Y'
y
Commit
3/use &fred instead of &&fred
For background see
http://totierne.blogspot.co.uk/2010/04/substitution-and-bind-variables.html
-Turloch
SQLDeveloper team -
How to prompt for user input in Forms
How do I prompt for user input in Forms?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
If the user chooses to input the value I want to update a set of database fields with the value.
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?Desgordon,
This can be accomplished by displaying your message to the user using an Alert. I use 3 different Alerts (Note, Caution and Stop) in my forms and they are inherited from a central source file (such as an Object Library or a Template Form) so they can be used by all of my Forms. You can set the text of the Alert using the SET_ALERT_PROPERTY() built-in and capture what button the user presses with the SHOW_ALERT() built-in. Additionally, if you need more than one button to be displayed in an alert, you use the SET_ALERT_BUTTON_PROPERTY() built-in to rename the default button or to add up to a total of three buttons in the alert. Here's an example:
DECLARE
Alert_ID ALERT;
v_AlertType VARCHAR2(10) := 'CAUTION';
v_AlertTitle VARCHAR2(25);
v_AlertText VARCHAR2(150);
n_AlertButton NUMBER;
BEGIN
v_AlertTitle := 'Title of Alert';
v_AlertText := 'This is message to the user.';
/* Code leading up to the decision point. */
alert_id := FIND_ALERT(v_AlertType);
/* Note: I only set the Label of Button 2 because the default button 1 label is 'OK' */
SET_ALERT_BUTTON_PROPERTY(v_AlertType, ALERT_BUTTON2, LABEL, 'Cancel');
SET_ALERT_PROPERTY(Alert_ID, v_AlertTitle, v_AlertText);
n_AlertButton := SHOW_ALERT(Alert_ID);
/* Now I can test the value of n_AlertButton for 1 or 2 to find out what button the user selected. */
IF ( n_AlertButton = 1 ) THEN
/* Do something, because the user selected 'OK' */
ELSE
/* It is assumed at this point that the user selected 'CANCEL' */
/* Stop processing any further. */
RAISE form_trigger_error;
END IF;
END:Hope this helps.
Craig...
-- If my response or the response of another answers your question, please mark the response accordingly. Thanks! -
How to prompt for user input in PL/SQL
How do I prompt for user input in PL/SQL?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
If the user chooses to input the value I want to update a set of database fields with the value.
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?
Edited by: desgordon on Sep 3, 2008 10:33 AMdesgordon wrote:
How do I prompt for user input in PL/SQL?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?OK, you're doing that in Forms...
>
If the user chooses to input the value I want to update a set of database fields with the value.Write PL/SQL procedure for this purpose...
>
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?Not clear what you mean with view?
But if you call your procedure in that button then yes 'control will be passed back to the code'...
Cheers!
Edited by: Faust on Sep 3, 2008 7:57 PM
Too slow... -
Limit checkboxes on "prompt user for input"
Is there away to limit the selection of checkboxes on the "Prompt User for Input" dialog vi? I am trying to build a dialog vi that will allow the user to select/check only 1 item before clicking OK.
Attached is my VI. This VI takes a entered filename and check to see if it exists in a given directory. If it does not exist, then it created (display a message stating it will be created). If the file does exist, then the user has prompted to select 1 of 4 options (Append, Replace (Overwrite), Re-Name (select new filename) or Escape (exit without creating filename). Right now I am using front panel controls that become visible however I would like to replace these controls with a dialog box with the four options.
Ideally this file selection would be a sub VI in application and only execute when called and only be visible via the dialog boxes.
Thank you.
Attachments:
FileChoices.vi 210 KBLike radio buttons? See
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/373f703eea0297368625620900701fd8?O...
Message Edited by Phillip Brooks on 10-16-2006 02:46 PM
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
Modifying "Prompt user for input"
Hi, all.
Is there any "Prompt user for input" VI where I can include enum or ring type inputs? If not, how can I modify the "Prompt user for input" VI to do that?
Thanks,
Francisco
Solved!
Go to Solution.Right click on the express VI and select 'Open Front Panel'. This will convert it to a regular VI that you can edit. Or, just create your own VI from scratch. Look at the shipping examples for 'pop-up's.
-
ExpressVI prompt user for Input dialog floating
I am using ExpressVI "prompt user for Input". The question is, when the dialog window pops up for input, I cannot activate other windows .
So how can I change this expressVI's dialog window to floating windows appearance?Short answer: you have to make your own.
You can start with the Express VI by right-clicking on the express VI and selecting "Open Front Panel" and click "Convert". This will create a brand new VI that is the equivalent of the Express VI. Save the VI under a new name within your project hierearchy, and then change the properties on the VI from a modal to a floating:
Select File->VI Properties.
Select "Window Appearance" from the pulldown menu.
Select "Custom" option and click "Customize...".
Select "Floating" in the "Window Behavior" section.
Maybe you are looking for
-
When copying some cd's into itunes folder on my computer, some of the songs are copied as separate albums. Please could someone advise how I bring the songs together as one album?
-
Tracking oracle database activities in security/system logs of windows server
Can database activity like create or drop tables and packages be tracked in the security/system logs of windows 2003 server for the oracle database 10.2.0.4? Can purging of oracle log, n case the file has become big or even tempered be tracked in the
-
Hi, when will Exchange rate difference realized G/L's update.and what is the difference between valuation and Exchange rate difference realized Thanks in advance, Sam
-
I want to load data parallely into two ods.
i want to load data parallely into two ods.
-
Get-MailboxFolderStatistics for mailbox with items larger than 25MB
Hi all, try to get mailboxfolderstatistic for all mailboxes that contains items larger than 25 MB With the following command: Get-mailbox -Resultsize Unlimited | get-mailboxfolderstatistics -includeanalysis -FolderScope All {Size -gt '25MB'}| Select