Clearing text field

Hi,
I have a page where you scan a barcode into a text field submits when enter pressed. If the barcode exists a report appears showing that record. The barcode must stay in the text field.
My question is if I scan a barcode and the barcode does not exist and then I scan another barcode, the previous barcode stays and gets appended onto the new barcode. How do I clear the barcode data out of the text field when I scan in a new barcode?

Hi,
Add something like the following into the report region's Region Footer setting:
<script type="text/javascript">
if (#ROWS_FETCHED# == 0)
$x("P36_BARCODE").value = "";
</script>Replacing P36_BARCODE with the actual name of the barcode field.
#ROWS_FETCHED# is populated with the number of rows fetched on the page for the report. If this is 0 (zero), then the script will run, and the field will be cleared.
Andy

Similar Messages

  • What is the Table name & Field Name for Clearing text field in F-53 Transac

    Hi,
    I need prepare a functional specification for Clearing text field in Check Register.I am not able to find the Table name and Field Name for Clearing text field in F 53 transaction code.Kindly provide me the Table and filed name.so that i can proceed.Kindly help me.
    I will assign points.
    Thanks
    Sunitha

    Hi
    From the payment document you have to link to the clearing document (Number BSEG-AUGBL, same Fiscal year and Company Code) in the clearing document the text entered in the transaction can be found on item text (BSEG-TEXT).
    RF05A is a Structure name
    Ranga
    Edited by: Ranga Swamy on Dec 4, 2008 7:55 PM

  • Unable to clear text Field in Multi Screen JFrame GUI Application

    i am working with a Swing GUI project where I want to accept user input in a
    text field
    I have used singleton pattern which will create only one instance of object
    due to this when i move from one scree to another the input of textfield
    doesnt updated I have used setText method to clear the JTextField but it wont
    works
    Program one -- 1st screen
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import java.awt.event.*;
    import javax.swing.JTextField;
    public class Frame1 extends JFrame
    public static Frame1 frame1;
    public JButton button;
    public JTextField input;
    public static Frame1 getInstance()
    if(frame1==null)
    frame1 = new Frame1();
    return frame1;
    public JButton getJButton(String mytext)
    JButton button = new JButton();
    button.setText(mytext);
    button.setBounds(450,450,150,50);
    return button;
    public void myGUI()
    JPanel panel = new JPanel();
    panel.setLayout(null);
    button = getJButton("1st Frame");
    addActionListener(button);
    input = new JTextField(10);
    input.setBounds(200,300,100,30);
    panel.add(input);
    panel.add(button);
    add(panel);
    setUndecorated(true);
    setSize(1024, 768);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    public void addActionListener(Object obj)
    try{
    JButton button1 = (JButton)obj;
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae)
    String text = "";
    input.insert("", 0);
    Frame2.getInstance().myGUI();
    Frame2.getInstance().repaint();
    dispose();
    catch(Exception e1)
    System.out.println("Exception==> "+e1.toString());
    public static void main(String[] args)
    Frame1.getInstance().myGUI();
    Frame1.getInstance().repaint();
    program 2 - 2nd screen
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import java.awt.event.*;
    import javax.swing.JTextField;
    public class Frame2 extends JFrame
    static Frame2 frame2;
    public JButton BackButton;
    public JTextField input;
    public static Frame2 getInstance()
    if(frame2==null)
    frame2 = new Frame2();
    return frame2;
    public JButton getJButton(String mytext)
    JButton button = new JButton();
    button.setText(mytext);
    button.setBounds(450,450,150,50);
    return button;
    public void addActionListener(Object obj)
    try{
    JButton BackButton1 = (JButton)obj;
    BackButton.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    input.setText("");
    Frame1.getInstance().myGUI();
    Frame1.getInstance().repaint();
    dispose();
    catch(Exception e2)
    System.out.println("Exception==> "+e2.toString());
    public void myGUI()
    JPanel panel2 = new JPanel();
    panel2.setLayout(null);
    BackButton = getJButton("2nd Screen");
    addActionListener(BackButton);
    input = new JTextField(10);
    input.setBounds(200,300,100,30);
    panel2.add(input);
    panel2.add(BackButton);
    add(panel2);
    setUndecorated(true);
    setSize(1024, 768);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    In this application the status of TextField input remain same means it shows
    the earlier input in the textfield wnen I come to earlier or next screen.
    what is the solution to clear the TextField input while moving from 1st
    scrren to 2nd screen.

    multiple screens = multiple posts
    well done indeed - just another farking cross-poster
    [http://www.coderanch.com/t/492998/Swing-AWT-SWT-JFace/java/unable-clear-text-box-Multi#2218566]

  • JFileChooser as save dialog clears text field on change directory

    I am trying to implement a basic save dialog using JFileChooser, which initiates with an initial file name, "untitled.txt". However, as soon as the directory is changed by the user, the text field is cleared. I want to ensure that whatever is in the text field when the user changes directories (i.e., untitled.txt may have been changed to something else by the user) stays visible throughout any kind of user navigation. I've tried all sorts of things, but nothing seems to work.
    Thanks for your help.

    Yes, it very well could be an OS/JDK issue. I'm using jdk 1.5 on Mac OS X (Tiger). Apparently, FileNameExtensionFilter is a jdk 1.6 implementation, because it doesn't work for me.
    Here's my code:
    JFileChooser fc = new JFileChooser();
    String output = outputTextArea.getText();
            String selectedFile = "untitled.txt";
            File file = new File(selectedFile);
            fc.setDialogTitle("Save");
            fc.setMultiSelectionEnabled(false);
            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            fc.setSelectedFile(file);
            setFileName(file.getName());
            int result = fc.showSaveDialog(this);
            if (result == JFileChooser.CANCEL_OPTION) {
                return;
            } else if (result == JFileChooser.APPROVE_OPTION) {
                file = fc.getSelectedFile();
                if (file.exists()) {
                    int response = JOptionPane.showConfirmDialog(null,
                            "Overwrite existing file?","Confirm Overwrite",
                            JOptionPane.OK_CANCEL_OPTION,
                            JOptionPane.QUESTION_MESSAGE);
                    if (response == JOptionPane.CANCEL_OPTION) return;
                if (!writeFile(file, output)) {
                    setErrorMessage(ERROR5_1); //Just a custom error message and display.
                    showErrorMessage();
                    return;
            }Is there a workaround if this is an OS or JDK issue?
    Thanks again for your help.

  • Clearing text field after query

    I have seen alot of old post on this but no answers, I am wondering if anyone knows how to accomplish clearing a text field after a query has been executed?
    Example:
    User types a query in the search field, clicks submit then the query is returned and the search field is empty again ready for the next query.

    I tried that and I was getting "(null)" in the value of the column I queried.
    This is what I came up with and it seems to be working. In the Page Definition click Edit Attributes and add this line to the On Load section:
    onload="html_GetElement('PX_SEARCH').value=''; html_GetElement('PX_SEARCH').focus()"That will clear the field and focus the cursor in the same field so its ready for another query.

  • How to clear text fields when the user navigates back to the screen

    Hi,
    Does anyone have any idea on how to clear the text input fields and dropdown boxes when the user navigates back to the screen, say for e.g. create screen?
    My issue is that i have plenty of fields in the create screen within a form. Is there a way to avoid programaticaly blanking out every field and just do it at the form level using an api to reset to a state before the user entry?
    Thanks

    This code allows you to make it more generic, and you would need to tweak it if there are more than TextInput controls, but it should provide some ideas.
    As far as using states, you could use SetProperty to set the text to empty, but that might be messier.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.containers.FormItem;
          import mx.controls.TextInput;
          import mx.events.IndexChangedEvent;
          import mx.core.Container;
          private function clearSreen(evt:IndexChangedEvent):void{
            var view:Container = tn.selectedChild as Container;
            for each(var child:Object in view.getChildren()){
              if(child is FormItem){
                var subchild:DisplayObject = child.getChildAt(0);
                if(subchild is TextInput){
                  TextInput(subchild).text = "";
        ]]>
      </mx:Script>
      <mx:TabNavigator id="tn" resizeToContent="true"
        change="clearSreen(event)">
        <mx:Form id="frm1" label="View Number One">
          <mx:FormItem label="First name:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Last name:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
        <mx:Form id="frm2" label="View Number Two">
          <mx:FormItem label="Address1:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Address2:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="City:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="State:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Zip code:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
      </mx:TabNavigator>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • Clear text field cache?

    I have a dynamic form that contains confidential financial data fields. How do I configure the form to not present a list of cached values from previous entries that match the string that is entered to that point? I'd really hate for client B to see client A's financial data.
    Thanks!

    I used the code (event.target.nocache = true; as described) in Designer 7.0.04 and it works fine. I suspect in your case that there is JavaScript code before that line that is producing an error (e.g., syntax) causing further JavaScript processing to abort. I have found that to be problematic during development and debugging. OH! If only JavaScript had a better development environment.
    NOTE: "this.nocache=true;" was not found to work -- at all in any event I tried.
    Though I am sure you have an answer by this date, this is for future developers.

  • Clear the content of a text field

    hello guys,
    i have text fields in a screen which are been populated in the PBO. Now i want to clear the content of the  text field such that the user can input new values in those text field.
    so, anyone knows how i can achieve this.
    tried,
    text field name = ' ', space.
    clear text field name.
    but none worked.
    thanks you for ur help.

    Hi,
    I think you have doen some thing like this in PBO.
    screen_field_name = 'some value'.
    So now in PAI you can do the following.
    CASE sy-ucomm.
         WHEN 'F_CLEAR'.    " Fcode for the clear button in the screen.
          CLEAR : field_name.
      ENDCASE.
    If the field is a mandatory field then you need to create a AT EXIT module and write the same code in that.
    Hope it helps you.
    Thanks,
    Sri.

  • How do I clear a form text field during validation using JavaScript?

    I am just learning JavaScript and the Acrobat API.  I have a form created in adobe acrobat 9 standard (starting from an existing form in MS Excel).  There is a text field for a Social Security Number.  I have a custom format script and keystroke script and a custom validation script. I would like to add to the existing validation script, that if what is entered doesn't match the validation test, then clear out the field as in erase all the characters that were typed into the field.  I want this to happen no matter what.  So even if someone filled in a valid SSN number and then moved to the next field, but then went back to the SSN field and decided to change their entry and this new entry was "invalid" then clear out the field (do not revert to what was typed in the field originally, even though it was considered valid by the script).  (There is currently no default value for this field.)  Thank you inadvance for you help on this.
    Here is the current validation script:
    // only run when field not blank
    if (event.value != "")
    // RegExp for validation #########
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == false)
    app.alert("Enter a 9-digit Social Security number with no spaces or special characters (e.g., 555555555). It will be converted to the format 555-55-5555.")
         //Here is where I've tried adding all of these lines, but none of them will clear out what is in the field
              //this.resetForm([event.target.name]);
              //event.target.value == "";
              //getField("SSN 1").value = getField("SSN 1").defaultValue;
              //getField("SSN 1").value == "";
              //event.rc = false;
    And incase these are somehow affecting it, here are the other scripts being processed on this field:
    Keystroke script:
    var input=event.value;
    var chars=input.length;
    if( event.willCommit || chars==8 )this.getField("Name 1").setFocus();
    Format script:
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == true)
    // add "-"
    event.value = RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;

    Thank you very much.  I did try that before, but I was using event.value == "";  I guess in this case I'm assigning the value of "", not making the value equal "".

  • Clearing a text field

    Hello
    I have a text field in the form.
    In some condition, i want to CLEAR it, pls. let me know the JavaScript code for it?
    if (myCondition = "X"){
    CLEAR my_text_field_1
    THANK YOU

    Thank you.
    In another case, my requirement is as below,
    if( my_text_field_1 == BLANK){
    my_text_field_2.rawValue = "Blank"
    if( my_text_field_1 = null){
    my_text_field_3.rawValue = "NULL"
    1) Pls. let me know How can code for this BLANKL, is it a single space like ""...........if so, if user enters 2 spaces or 3 or 4 spaces, wht happens in that case?
    2) Pls. consolidated the above JavaScript in a best practice way
    THank you

  • How to clear a text field when another is selected

    Ok I'm new at this, so please forgive me...
    I have a form that has the following
    a text field that is a dollar amount (eg @1,000)
    another text field that has the cents value (eg .00)
    and then
    a text field that has a % amount (eg 100%)
    I only won't the user to fill in one of the options,
    either the dollar and cents amount
    OR the % amount.
    I don't won't them to be able to enter text into both options and once they click on one option I want the other to clear if there is any text entered into that field.
    I hope that makes sense, any helpful information would be greatly appreciated!!

    Sorry..I figured it out. Thanks.

  • I would like to be able to start typing a URL directly (with no need to clear the field first) after opening a new tab with my homepage...

    I've just installed the newest desktop version of the Firefox browser because my Opera doesn't feel very well these days. I'm trying to become friends with Firefox, and that's why I've changed the new tab settings in order to have my offline homepage loaded every time I open a new tab. There is an inconvenience — when I press Ctrl+T, the cursor appears at the end of the URL. It means that when I start typing, the letters show in the address bar after the URL of my homepage, so what I need is to clear the field first.
    Is there a way to get rid of this? (If it helpes, I'm currently using Windows 7.)
    I would appreciate if I could just press Ctrl+T, type a URL, and press Enter when I want to go to a website different from my homepage. Thank you for your replies!

    Then you can use (Ctrl+L and) Ctrl+A to select all the text in the location bar or Shift+Home/End.

  • Unable to define Radio Button Text field & unable to change column position

    Hi,
    While designing a screen in Screen Painter, I am unable to define Radio Button Text field as this option is not there in Graphical Element. And also I want to specify the starting position of column of that element different from the default value, but I am unable to define that because the field is non-editable.
    Can any one please help me out.
    Regards,
    Koushik

    Hi,
    Please find below the sample program from ABAP docu :
    PROGRAM demo_dynpro_input_output.
    DATA: input  TYPE i,
          output TYPE i,
          radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
          box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.
    CALL SCREEN 100.
    MODULE init_screen_100 output.
      CLEAR input.
      radio1 = 'X'.
      CLEAR: radio2, radio3.
    ENDMODULE.
    MODULE user_command_0100 input.
      output = input.
      box1 = radio1.
      box2 = radio2.
      box3 = radio3.
      IF exit NE space.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    Here radio1(1) TYPE c is defined within the program but in the element list there are RADIO1 element exist. One is actual radio button and the other is Radio Button Text.
    I am not able to create that radio button text using same object name.
    Please suggest.
    Regards,
    Koushik

  • Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

    Hi!
    I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
    How to do this is described by Stefan Cameron here:
    http://forms.stefcameron.com/2006/07/29/dynamic-properties/
    There's a snag, though, and to describe it more clearly:
    The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
    But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
    If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
    I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
    Any suggestions appreciated!

    Although your issue is far beyond mine, I was hoping you can help me out.....
    I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
    Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
    Thank you

  • How to get data from list of values (LOV) to be displayed in a text field ?

    Hi guys,
    I am very new to Oracle APEX so please spare me if it is a silly question. How can I get the selected values from a set of list of values (LOV) displayed in a text field (or text area or so) ? Fox example, in my form I create 4 items: STATE, COUNTY, STREET, ZIPCODE and all of them are LOV (list of values). I also create 2 buttons (ADD & REMOVE). Then I create a test field (or text area name SELECTED RECORD). Now here is what I want to do with my form:
    When I set the values for all 4 fields, I will click on the ADD button then I want those values be displayed in the text field.
    For example, if the selected values are:
    STATE = Alabama
    COUNTY = Abbeville
    STREET= 1 Street
    ZIPCODE = 36310
    And the ADD button is pressed. Then in the text field I want it displays like this:
    Alabama,Abbeville,1 Street,36310
    If I choose other values and click ADD again, a new line will be added into the text fields (text area). If I click the REMOVE button, then it will clear those two line in the text field.
    Would it be possible to do it? Any help will be greatly appreciated. Thanks in advance.

    If you can live with the page being submitted and refreshed, make your ADD button do a submit with a request value of ADD and make your REMOVE button do a submit with a request value of REMOVE.
    Then create two computations (one firing with a condition of Request = ADD and the other firing with a condition of Request = REMOVE).
    In the ADD one, concatenate the values together into the text area (most likely a PL/SQL computation wiill be what you want). In the REMOVE one, set it to null with a PL/SQL computation.
    If you want it done without submitting the page, make the buttons each do a redirect to a URL but instead you will have to write two short javascript functions in the page HTML header to manipulate the field values. Each button would call each javascript function in an onclick event.

Maybe you are looking for

  • How can I put music from my itunes on to my husband's phone but NOT backup his phone on my computer

    How can I put music from my computer on to my husband's Iphone without doing a backup of his phone on my computer?  All I want to do is add music to his iphone for him...not backup or sync his phone... thanks

  • How can i get my old apple account ?

    i wrote the right passw and everything but it tolds me to verify it... so i go to the e mail and bla bla bla.. what can i do ? :((( D:

  • Unable to see layout design in page editor

    I am using JDeveloper version 11.1.2.0.0. I downloaded the hands-on practices from the site Tuhra2 – Sample application for the Oracle JDeveloper 11g Handbook. When I open the jspx files under Web Content, the visual design does not show up in the De

  • Iphoto not opening, can't find pics

    Hi I have Iphoto 08 and when I connect a camera it does not open Iphoto anymore, nor can I click on it and open it to see the events etc. I am assuming Need to uninstall and reinstall? or just install again? my other issue is where do I find my pictu

  • JDBC Adapter Performance

    Hi Experts, We have nearly 60 interfaces will read/write from/on DB and AS400 tables. We are facing so many problems in production system. Everyday the messages are strucking at Adapter Engine. All messages are in "To be delivered" stage. If we can s