Using a scanner to interpret user input in an array

Hi
Does anyone know how to use an array to store user input?
I'm a beginner in Java and I need help making an array with 5 positions that can be filed by the user as they type.
This is needed as a guide to read up more complex user input methods. I have been told to use a "scanner" (java.util.Scanner) to do this and frankly, I'm ridiculously lacking in Java skills. Any help would mean a whole lot.
So far, this is the scanner I've been working with:
import java.io.*;
import java.util.Scanner;
import java.util.*;
public class ReadConsole
public static void main(String[] args)
Scanner input = new Scanner(System.in);                                                                
System.out.println("Menu System - Please enter your choice");
System.out.println("Option 1");
System.out.println("Option 2");
System.out.println("Option 3");
for(int i = 0; i < 1; i++){
int num = input.nextInt();
if(num==1){
System.out.println("Option 6");}
else if(num==2){
System.out.println("Option 7");}
else if(num==3){
System.out.println("Option 8");}
else{
System.out.println("Try again");
i = 0;
}

That sounds do-able, but im struggling when it comes to inputing 5 values from the user. what do i do to separate the values? i know that sounds vague, ... but if I can make one "position", why can't I make five??
Take a look at what I've done:
import java.io.*;
import java.util.Scanner;
import java.util.*;
public class Input
public static void main(String[] args)
Scanner input = new Scanner(System.in);    
System.out.println("Please select your lucky number");
System.out.println("Options are:");
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("or 4");
for(int i = 0; i < 1; i++){
int num = input.nextInt();
if(num==1){
System.out.println("Your lucky number is 1. Cool");}
else if(num==2){
System.out.println("Your lucky number is 2. Cool");}
else if(num==3){
System.out.println("Your lucky number is 3. Cool");}
else if (num==4){
System.out.println("Your lucky number is 4. Cool");
//ELSE STATEMENT DOESNT COMPILE ... ((not a big deal right now))
//else{
//System.out.println("Start Over. You've done it all wrong");
//i = 0;
}okay I see that the scanner works this way, but when I copy-pasted that whole section of my code from "Scanner input = " down, it wouldn't compile at that first line.
I had named it "Scanner input = new2 Scanner(System.in);"
How can I make another user input position with the scanner?
Message was edited by:
tark_theshark

Similar Messages

  • Help With Homework Reading user input into an Array

    This program is to read questions from a file and retrieve user input as answers.
    This program is no where near complete, but I am stuck. (I dont know why, maybe its too late at night)
    I have a total of three classes. I am currently stuck in my main class. See Comments ("What the hell am I printing/ Will this work?"). In this next line of code, i need to read the question from the file to the user, and then accept their input.
    Main Class:
        public static void main(String[] args) {
            try {
            Scanner in = new Scanner(new FileReader("quiz.txt"));
                catch (Exception e) {
                System.out.println(e);
            ArrayList <Questions> Questions = new ArrayList<Questions>();
            ArrayList<String> answers = new ArrayList<String>();
                  for (Questions qu : Questions)
             System.out.println(); //What the hell am I printing.
             String answer = in.nextLine(); //Will this work?
             answers.add(answer); //This should work
          }Questions Class:
    public class Questions {
        String Questions = "";
        public String getQuestions() {
            return Questions;
        public void setQuestions(String Questions) {
            this.Questions = Questions;
        public Questions(String Questions)
            this.Questions = Questions;
    }answers class:
    package QuizRunner;
    * @author Fern
    public class answers {
        String answers = "";
        public String addAnswers() {
            return answers;
        public answers(String answers) {
            this.answers = answers;
        }

    doremifasollatido wrote:
    According to standard Java coding conventions, class names should start with a capital letter (so, your "answers" should be "Answers"). And, variable and method names should start with a lowercase letter (so, your "Questions" should be "questions").
    And classnames should (almost) never be plural words. So it should probably be an 'Answer' and something else containing a collection of those objects called 'answers'.
    Also, *your variable name should not be the same (case-sensitive match) as your class name.* Although it will compile if done syntactically correctly, it is highly confusing! I first wrote this because you did this for both "Questions" and "answers" classes in their class definition, but you also used "Questions" as your variable name in 'main'. (Note that applying the standard capitalization conventions will prevent you from using the same name for your class name as for your variable name, since they should start with different cases.)
    Of course having an 'Answer' called 'answer' is often fine.
    Your Questions class should probably be called "Question", anyway--it looks like it should hold a single question. And, your "answers" class should probably be called "Answer"--it looks like it should hold a single answer. You aren't using your "answers" class anywhere right now, anyway.Correct. There might be room for a class containing a collection of Question objects, but it's unlikely such a class would contain just that and nothing else.

  • Transferring User Input Into an Array

    I want the user to input whats inside the matrix so I tell them "Enter Row 1 of Matrix 1: " Say for example they entered the length of the square matrix as 3, I would then want them to enter something like "1 2 3" as Row 1. With my current code I get:
    3 3 3
    3 3 3
    3 3 3
    I cant figure out what I should change so that its:
    1 2 3
    1 2 3
    1 2 3
    Thanks so much for any help. Heres the code so far:
    import java.util.Scanner;
    public class MatrixAddPro
      public static void main (String[] args)
         int row1, col1;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of the square matrix: ");
         col1 = scan.nextInt(); 
         int[][] a = new int[col1][col1];
         System.out.println("Enter Row 1 of Matrix1: ");
         while(scan.hasNext())
         a[1][1] = scan.nextInt();
         //for (int row = 0; row < a.length; row++)
            //for (int col = 0; col < a[row].length; col++)
               //a[col1][col1] = scan.nextInt();
         for (int row = 0; row < a.length; row++)
            for (int col = 0; col < a[row].length; col++)     
               System.out.print(a[1][1] + "\t");
            System.out.println();  
    }

    import java.util.Scanner;
    public class MatrixAddPro
      public static void main (String[] args)
         int input, row, col;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of the square matrix: ");
         col = scan.nextInt(); 
         row = col;
         int[][] a = new int[row][col];
         for (int x = 0; x < row; x++)
            for (int y = 0; y < col; y++)
               {System.out.println("Enter Row"+(x+1)+" Col"+ (y+1));
               input = scan.nextInt();
               a[x][y] = input;
         for (int x = 0; x < row; x++)
            for (int y = 0; y < col; y++)     
               {System.out.print(a[x][y] + "\t");
               System.out.println();      
    }OUTPUT:
    Enter the length of the square matrix:
    3
    Enter Row1 Col1
    1
    Enter Row1 Col2
    2
    Enter Row1 Col3
    3
    Enter Row2 Col1
    1
    Enter Row2 Col2
    2
    Enter Row2 Col3
    3
    Enter Row3 Col1
    1
    Enter Row3 Col2
    2
    Enter Row3 Col3
    3
    1
    2
    3
    1
    2
    3
    1
    2
    3
    Alright so now its not printing in rows...
    Thanks for your patience/help guys.

  • How to use Pl/sql block to edit check user input

    Hi,
    Please advise on PL/SQL Block code that could be used to Check User input from within a Loop and proceed conditionally based upon User Supplied compliant Input. Thanks in advance.

    Hi,
    yakub21 wrote:
    You could use the ACCEPT to get user input and then assign the input to a variable that could then be verified.
    I believe that anything is possible because we don't yet have proof that it is not!
    I do have code that can accept user input. Is it PL/SQL code? Sybrand was clearly talking about PL/SQL:
    sybrand_b wrote:
    Pl/sql is for server side code, it is not a front end tool, and it is incapable of the functionality you describe.If you do have PL/SQL code that accepts user input, please post an example. A lot of people, including me, would be very interested.
    Pass the user-input value to a variable and then assign that value to another variable from within a Declare of a PL/SQL Block.
    The opportunity here is to figure a way to loop with user input until desired input is entered by the user before proceeding with the code. I'm using PL/SQL Block because I don't want the code to persist. I just want to run it as part of database configuration procedure. ThanksIt sounds like you're talking about SQL*Plus, which is a very poor tool for looping or branching.
    It's possible, but it's not pretty. The following thread shows one way of looping in SQL*Plus:
    Re: How to give the different values to runtime parameters in a loop?

  • Custom Exit - Get System Date with user input

    I am using a BW query to connect to a BOBJ universe.  Some reports from the universe must be scheduled to run for today's date and emailed to a user.  Unfortunately, we cannot determine "today" dynamically when scheduling in BOBJ.  There will be other reports filtered with a range.
    I want to create a BW custom exit variable to allow user input.  My idea is to take the user input, like "01/01/1904", and replace the value with today's date.
    Is this possible?
    Here's example code for what I am trying to achieve.
    IF user input = "01/01/1904" then get today's date.
    else use the values from the user input.
    Scenario 1: user inputs 08/01/2010 - 08/31/2010 the custom exit returns values 08/01/2010 - 08/31/2010
    Scenario 2: user inputs 01/01/1904 the custom exit returns 09/03/2010 (today)

    Hi,
    In your case, i_vnam variable and processing variable for below statement would be same.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'variable name'.
    Please see the below article for reference.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true

  • Owb - Capturing user input classes

    Hi,
    I'm using OWB 9.2.0.3 and I'm looking at creating some OMB*Plus scripts to deploy (instead of using the GUI)
    I noticed in the sample code (on OTN) for OWB, some classes for "capturing user inputs" in OMB*Plus. I think that this would be a great addition to my scripts (instead of hard coding userid and password).
    How do I get this to work? What do I do with these classes? where to put them? and would you have any documentation on how to code this in OMB*Plus.
    Thank you very much.
    Guy LaBelle

    Guy,
    The description is missing... and I will submit this right away to be added. The link will be with the location of the downloadable file. Will be there within the next couple of days.
    Now, without the screenshots (hope this helps to some extend):
    The omb_params zip file contains classes for a generic modal dialog that can be used from OMBPlus for capturing user input. It will support parameters that are text or passwords. If you unzip this file into owb\bin\admin you can try the dialog from OMBPlus.
    The Java can be invoked by calling as follows;
    # java::new oracle.owb.samples.CaptureParams {
    # display_string_list display string for dialog ie. {"Hostname", "Port", "Service"}
    # param_name_list to query after dialog is complete ie. {"vhostname", "vport", "vservice"}
    # param_type_list STRING or STRINGHIDE or list of tokens (comma separated) for combo box
    # title_string_for_dialog Title for the dialog.
    # dialog_prompt_string Prompt string for dialog.
    or
    # java::new oracle.owb.samples.CaptureParams {
    # display_string_list display string for dialog
    # param_name_list to query after dialog is complete
    # param_type_list STRING or STRINGHIDE or list of tokens (comma separated) for combo box
    # title_string_for_dialog
    # dialog_prompt_string
    # ok_button_string
    # cancel_button_string
    or
    # java::new oracle.owb.samples.CaptureParams
    # title_string_for_dialog
    # dialog_prompt_string
    # ok_button_string
    # cancel_button_string
    There is a Java accessor methiod named 'okButton' that will return a boolean (in Java), the Tcl shell will return 0 for false, and 1 for true. This can be used to determine if the user has pressed the OK or cancel button. Since the user can define the text for these buttons, they can be used for Yes/No style questions for example.
    5.1 Example to capture user input;
    The following dialog can be created with the Tcl below;
    The Tcl to create this dialog is show below, this creates a modal dialog to capture the user input for username, password (in password field), connection string and an option selectable from a combo box;
    set pars [java::new {String[][]} 3 {{"User" "Password" "Connect" "Option"} {"user" "pass" "connect" "option"} {"STRING"
    "STRINGHIDE" "STRING" "thick,thin"}} ]
    set jtitle "OWB Migration"
    set jprompt "Please enter migration properties:"
    set paramList [java::new oracle.owb.samples.CaptureParams $pars $jtitle $jprompt]
    # To check whether OK or cancel is pressed used retrieve okButton/cancelButton on object, then check value (0 - false, 1 - true)
    set okpressed [$paramList okButton]
    # To retrieve the parameters invoke getValue passing the parameter name, the user is stord in a variable (for example);
    set userval [$paramList getValue "user"]
    set passval [$paramList getValue "pass"]
    set connectval [$paramList getValue "connect"]
    set optionval [$paramList getValue "option"]
    5.2 Example to create a question-style dialog;
    set paramList [java::new oracle.owb.samples.CaptureParams "OWB Dimensional Design" "Do you want to create a cube?" "Yes" "No"]
    Like the example above the 'okButton'/'cancelButton' methods can be used to query the button that was selected.
    Thanks,
    Mark.

  • Generate charts based on user input

    Hello!
    My goal is to create an application in which a user would enter information (specifically in the form of numbers and financials). The final output would create a page / document that shows summary of the data and also manipulates the data into bar and pie charts. (We are trying to create side by side comparison charts based on user input.)
    I have a subscription to the Creative Cloud, so I have access to a large % of Adobe products. Do you have any suggestions on what application I should use for this project? The final output could be PDF or Web based.
    Thank you!
    Bethany

    Hi Bethany,
    You may check out Adobe FormsCentral at https://www.acrobat.com/formscentral/en/home.html and see if that's what you need. You can create forms using Adobe FormsCentral to collect user input and user responses will be displayed in charts.
    Thanks,
    Wenlan

  • Question Pertaining to User Input

    I'm have trouble figuring out how to prompt for user input and then use that user input as part of my code. For instance, I want to declare two variables that will hold complex numbers. Then, I want the user to input two complex numbers. After this, I want to place those two newly inputted into the variables that I created. Then I want to determine which of those two has a greater norm/modulus. Finally, I want to print those results out.
    Here is my code so far:
    Normalizable m1 = new Complex();
    Normalizable m2 = new Complex();
             System.out.println("Enter the real and imaginary parts of a complex number: ");
             BufferedReader br = new BufferedReader(new InputStreamReader(System.in));Please point me in the right direction.

    I was making two points at once - and in doing so I might have made it sound more daunting than it really is.
    The first point was a direct answer to your question: use readLine() to get the user input, String methods to break it up and parseDouble() to obtain numerical values to create your Normalizable/Complex.
    I really don't think there's a more straight foward way of approaching things. Try it and see if you can sucessfully read in a single complex number and display it.
    {noformat}
    Enter the real and imaginary parts of a complex number>12 -5
    You entered 12.000 - 5.000i
    {noformat}You will need the API docs for the relevant classes and have read them. Post what you've come up with for this first part of the problem if you get stuck. (I doubt if anyone here will actually write the code for you, since that would take all the fun out of it.)
    Regarding the second point, you're right: by suggesting an auxillary method to read and parse the input I was adding some complexity. Feel free to ignore that suggestion. Personally I prefer a little complexity if it reduces complicated code to managable pieces. Complications will grow into a tangled mess (and are a place for bugs to live in); complexity can always be dealt with one small well documented chunk at a time.

  • How to save User input into DB using webdynpro abap

    Hi,
    Im trying to create an application using webdynpro abap.
    I want to know how to save the data input by user, into a database table.
    In my UI, I have a table control which is editable and user inputs data into this. I need to know how i can transfer this data to a DB table.

    hello,
    u can do it by reading ur context node.
    we bind our UI elements to context attributes of appropriate type .
    we read their values using the code wizard or by pressing control+F7, click on radio button read node/attribute
    here for ur specific case , u must have binded ur table control with the context attribute , now u need to simply read this attribute
    eg suppose u have created a context node " cn_table"
      reading context node cn_table
       DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
             lo_el_cn_table TYPE REF TO if_wd_context_element ,
             ls_cn_table    TYPE wd_this->element_cn_table.
    *   navigate from <CONTEXT> to <CN_TABLE> via lead selection
      lo_nd_cn_table = wd_context->get_child_node(
                       name = wd_this->wdctx_cn_table ).
    **    get element via lead selection
      lo_el_cn_table = lo_nd_cn_table->get_lead_selection(  ).
      lo_el_cn_table->get_static_attributes( IMPORTING
                 static_attributes = wa_table ).
    here wa_table is the work area of structure type . u need to create a structure first with the same variables as there are the context attributes in ur node cn_table
    in ur
    now ur wa_tablecontains value
    u can nw use appropriate FM to update , delete and modify the DB table using the value
    u cn directly use SQL statements as well in the method of ur view , but direct SQL statements are nt recommende
    rgds,
    amit

  • Accepting user input and executing a PL/SQL block using it

    Hi All,
    I am working on a requirement wherein I have to accept values from the user for the various arguments to be supplied to a PL/SQL block and then execute it using these values. For now, I am using the following logic:
    PROMPT Enter value for the Category
    ACCEPT cCategory CHAR PROMPT 'Category:'
    DECLARE
    cCategry CHAR(1) := '&cCategory';
    BEGIN
    DBMS_OUTPUT.PUT_LINE('The value of the Category as entered by you is' || cCategory);
    END;
    PROMPT Press y if you want to proceed with the current values, or press n if you want to re-enter the values
    ACCEPT cChoice CHAR Prompt 'Enter y or n:'
    DECLARE
    cCategry CHAR(1) := '&cCategory';
    sErrorCd VARCHAR2(256);
    sErrorDsc VARCHAR2(256);
    BEGIN
    IF '&cChoice' = 'y'
    THEN
    DBMS_OUTPUT.PUT_LINE('Starting with the process to execute the stored proc');
    --- schema1.package1.sp1(cCategry, sErrorCd, sErrorDsc);
    --- DBMS_OUTPUT.PUT_LINE('Error Code :' || sErrorCd);
    --- DBMS_OUTPUT.PUT_LINE(' Error Description :' || sErrorDsc);
    ELSIF '&cChoice' = 'n'
    THEN
    Now I want that the proc again start executing in the loop from the 1st line i.e. PROMPT Enter value for the Category. However i see that this is not possible to do that PROMPT statements and accepting user inputs execute only on the SQL prompt and not inside a PL/SQL block.
    Is there an alternate method to establish this?
    Thanks in advance.

    Hi,
    You can write a genric procedure to achive the desired output. Pass 'Y' or 'N' in the procedure.
    Call that procedure in simple pl/sql block during runtime using substituton operator.
    For ex
    create or replace procedure p1(category_in in varchar2)
    IS
    BEGIN
    if (category_in='Y')
    then
    prcdr1()
    /** Write your logic here ***/
    elsif(category_in='N') then
    prcdr2()
    /** write your logic here***/
    end if;
    exception
    /***write the exception logic ***/
    end p1;
    Begin
    p1('&cat');
    end;Regards,
    Achyut K
    Edited by: Achyut K on Aug 6, 2010 5:20 AM

  • Using User Input Rather Than "strStartFolder".

    Hi guys!  
    This script is very simple but it's part of a project I've been working on for some time now.  Any VBS guru (or novice for that matter) will be able to tell what it does after a brief scan of the code.  Again, like I said, this is a very simple
    script.
    For newcomers, this script siimply looks for duplicate files in a folder on one or more of your drives.
    However, I'm having 2 issues...  
    First, I need to change the script to where the Wscript engine is used to ask for user input via an InputBox and for that data to be read into a variable which could be "strStartFolder"?  If
    not, any variable will do, but having to enter in location you wish to search by editing the script manually is not practical.
    strStartFolder instead of someone having to edit the code manually each time and enter the path to the folder you wish to scan.  In this example, I have last scanned the "Largest Vidz Appz and Musik Folder" on drive H:\.  I did this manually
    of course...  
    I have played with this using several methods which all only seemed to work "partially".  
    The second issue I am having is that you cannot scan just a drive.  It MUST be a folder.  If you input, for example, "H:\" you will receive an error stating that either permission has been denied or the path cannot be found.  
    Still being somewhat of a noob myself when it comes to scripting I'm sure there is some simple parameter I can/could have entered to fix this but I tried, "H:\*", H:\*\", H:\*.xxx"\ (.xxx being the extension of course) and other things).
     Nothing seems to work but I believe that is because of who the original VBS was coded initially.   Again, this is why I come to the greatest resource on the net.
    One more thing, when all is said and done the script should ask for a user's input via Wscript so that an InputBox greets them with a message such as, "Please enter the location you wish to scan for duplicates:".  And then, depending on their
    answer (being of correct syntax, etc, etc) the script runs and outputs a file named "dups.txt" using the Cscript engine.  
    Please note that I have been running the script as follows to allow for output to a text document.  "C:\cscript //nologo FindDuplicates.vbs > duplicates.txt", I would like to avoid having to do this as well if possible but it's ok if not. 
    Running this script by "double clicking" can be a disaster if you have tons of duplicate files.  So asking for user input is the only area where Wscript need be used.  But hey, this is why I'm here.  For guidance...  
    This is cake for most of you so I will be interested in seeing the different ways you all come up with resolving this issue.  
    Anyway, here is the script!  Thanks in advance for your help!
    Dave
    Set objDictionary = CreateObject("Scripting.Dictionary")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    strStartFolder = "H:\Largest Vidz, Appz and Musik Folder"
    Set objFolder = objFSO.GetFolder(strStartFolder)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    strName = objFile.Name
    strPath = objFile.Path
    If Not objDictionary.Exists(strName) Then
    objDictionary.Add strName, strPath
    Else
    objDictionary.Item(strName) = objDictionary.Item(strName) & ";" & strPath
    End If
    Next
    ShowSubfolders objFSO.GetFolder(strStartFolder)
    For Each strKey in objDictionary.Keys
    strFileName = strKey
    If InStr(objDictionary.Item(strFileName), ";") Then
    arrPaths = Split(objDictionary.Item(strFileName), ";")
    Wscript.Echo strFileName
    For Each strFilePath in arrPaths
    Wscript.Echo strFilePath
    Next
    Wscript.Echo
    End If
    Next
    Sub ShowSubFolders(Folder)
    For Each Subfolder in Folder.SubFolders
    Set objFolder = objFSO.GetFolder(Subfolder.Path)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    strName = objFile.Name
    strPath = objFile.Path
    If Not objDictionary.Exists(strName) Then
    objDictionary.Add strName, strPath
    Else
    objDictionary.Item(strName) = objDictionary.Item(strName) & ";" & strPath
    End If
    Next
    ShowSubFolders Subfolder
    Next
    End Sub
    Again, thank you in advance for your help..  And why is some of my text here in this post showing in smaller font than other text?  It seems to be dependent on the line you type on?  This is,
    of course, not the problem I came here to resolve, I am only curious.  ;-)
    DB
    PAinguIN

    Thank you for your response!  
    So if I used the "MyMessage" variable after the "=" in the line below then the users input should be the folder that is searched as long as your lines are added before this line correct?
    Thanks again!
    DB
    strStartFolder = "H:\Largest Vidz, Appz and Musik Folder"
    PAinguIN

  • How to create database from scratch using user input

    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????

    Anuvrat wrote:
    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?Presumably because you want to (fun) rather than because you need to (job or project.)
    If the second then don't do it.
    >
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????You would start by learning about DDL which is the common name for the languages, which vary by database, used to create the entities that represent the structure of a database. Until you figure out the syntax of that you can't do anything in java.

  • Captivate 6 How to validate user input without using keyboard shortcuts

    I've been using Adobe Captivate 6 for about 4 months now.  Completely new to the program.  The number one function of Captivate for me will to create many software simulations for verifiable training.  This means that I will be utilizing the training and assessment modes A LOT.  I have run into many hurdles throughout the process, but one of my biggies right now is this:
    In the training and assessment modes, I have times where the user must input data such as an address or number.  In the actual software they will be utilizing it is not always required to use TAB or ENTER in order to move to the next field.  In some instances, it will be necessary to actually click into a field after entering data.  My problem is that it seems as if Captivate will not allow this,  as a keyboard shortcut is automatically entered even if a TAB or ENTER is not required after input.  I assume this is so that the inputted information can be verified.  If you decide you do not want to use a keyboard shortcut to validate the inputted information, you must have a submit button.  Is there any way to change this??  All I want is for the user to enter information and then click into another field WITHOUT having to press ENTER, TAB, or hit a submit button.  Is this even possible if you need user input to be validated??  Any ideas or suggestions would be much appreciated!!

    Hello,
    A while ago I explained the work flow I’m using often in that case, only for the last field you need to have either a shortcut or a submit button AND the sequence has to be imposed. The idea is that you make the Submit button for the first field transparent, delete the  ‘Submit’ text and put it over the second field. So if the user clicks on the second field, he also submits the value of the first field.
    Here is the blog post I’m referring to:
    http://lilybiri.posterous.com/one-submit-button-for-multiple-text-entry-box
    Although it was written for previous versions, the idea will still be functional.
    Lilybiri

  • Accepting dynamiv user input using PL/SQL

    Hi,
    I need to accept dynamic number of user input values.
    What i need is i will enter the number of employees to be created.
    If i enter 2 then i need to dynamically accept 2 employee details.
    DECLARE
       v_emp_cnt    NUMBER;
       v_emp_id     VARCHAR2 (15);
       v_emp_name   VARCHAR2 (200);
    BEGIN
       v_emp_cnt := &v_emp_cnt;
       FOR i IN 1 .. v_emp_Cnt
       LOOP
          DBMS_OUTPUT.PUT_LINE('INSIDE LOOP');
          v_emp_id := &v_emp_id;
          v_emp_desc := &v_emp_Desc;
          INSERT INTO emp_details (process_id,
                                            column11,
                                            column12,
                                            column13)
            VALUES   ('EMPLOYEES',
                      'EMP-' || i,
                      v_emp_id,
                      v_emp_desc);
       END LOOP;
    END;
    /Can anyone let me know if this is the right approach to acheive my requirement. Please suggest alternatives.
    Thanks
    Vamsi Krishna

    PL/SQL is a server-side language-- it doesn't have the ability to interact with a user. A client application such as SQL*Plus, can both prompt for input and submit SQL statements to the database. It's probably possible to hack together a SQL*Plus script that could do something like what you appear to be looking for but using SQL*Plus for this sort of thing would generally be the wrong architectural solution. You'd generally be better off with a small shell script that prompted the user for data and then called a stored procedure.
    Justin

  • Validating user input in VC using javascript

    Hi All,
    I'm exploring possible solutions for validating user input and reporting error messages back to the screen for users to correct their entries. It was mentioned in one of the threads that this can be done using javascript..
    can the source code in VC be edited?? Can anyone give me pointers on how to achieve this and where to incorportate the javascript function for validation? Thanks!
    cheers
    Prachi

    Hi
    Please go through the following links :-
    Alpha-Numeric Validations
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/norecordsreturnedshalldisplayalternatemessage&
    Cheers
    Navneet

Maybe you are looking for

  • Who created Doc.

    Hi, My client requirement is, when user made a payment via F-53 tcode then it will generated document number. My question is who generated this document? I had checked BSEG, BSAK , BSIS and BSAS table where no user id column to determine that who gen

  • Decision for New client creation ????

    Dear All We have a situation described below - In the SAP clinet we have got several company codes and several plants (More than 100). Now my company is selling 1 plant (e. g. D001) to another company. The new company who is buying the plant is a dif

  • NullPointerException when using Scanner

    Hey people, I've made this little class for interacting with the user via the console: package dyreleg; import java.util.Scanner; * Communicates with the user via the command line * @author majs public class ConsoleUI implements UserInteraction {    

  • Gap between plastic front panel and metal band

    hello, i have noticed a gap between the front plastic and the metal band when taking the iphone off a case. theres a 1mm gap between the plastic and metal, and 3 small cracks along the edge of the plastic, 2 at the top and 1 at the right side. the ga

  • File Cannot be opened error in Numbers

    I tried to open a file I had stored in the cloud in numbers.  I got a message that the two versions did not sync.   When I selected one, I got an error stating that the file cannot be opened.  Same problem on my iPad