How do you clear an InputText field with a button click

I am trying to create a calculator and I want to be able to use a "Clear" button that will reset all the values entered in several InputText fields and the total which is a label.     I can update and clear a label using the UpdateContext
function, but this isn't working for an InputText field.   Can someone provide an example on how to clear one InputText field?

Hello,
To do this you need to do the following
Add an "Input Text", select the inputText and click Express view (bottom right).
Set the default value to
textboxvalue
without any quotes
On the behaviour / OnVisible of screen you put the inputText on set for example the following
UpdateContext({textboxvalue: "Enter text here"})
You can now add several buttons on the screen that do something
UpdateContext({textboxvalue: ""})
or
UpdateContext({textboxvalue: "Enter Text here"})
Or you could chain it with another OnSelect that is going on on the screen and reset your textbox. You can then also add the value the user has entered in a collection too (see bottom example)
Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
Collect(inputcollection,{userinput: InputText1!Text});Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
I believe this should point you in the right direction
Regards
StonyArc

Similar Messages

  • How do you sort a text field with numeric data in numeric order

    We have a text field (varchar2) that has numeric data. When we sort it the items display as
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    *101*
    12
    Instead of
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    12
    101
    How can I make it display in numeric order if the field is a varchar2
    Howard

    To avoid string-to-number conversion:
    SQL> with t as (
      2  select '1' a from dual union
      3  select '2' a from dual union
      4  select '3' a from dual union
      5  select '4' a from dual union
      6  select '5' a from dual union
      7  select '6' a from dual union
      8  select '7' a from dual union
      9  select '8' a from dual union
    10  select '9' a from dual union
    11  select '10' a from dual union
    12  select '101' a from dual union
    13  select '12' a from dual)
    14  select a from t
    15  order by length(a), a;
    A
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    12
    101
    12 rows selected.Max
    http://oracleitalia.wordpress.com

  • SRM Shopping Cart - how do you clear out custom fields on a SC create

    We have added custom fields to the Shopping cart header.  now when we use an existing shopping cart to create a new one (do a copy from within SRM UI) the data in these custom fields on the existing shopping cart is copied tothe new shopping cart.  We doNOT want this to happen but we can't find a place to add code to clear them out.

    we ended up putting code in this method and solved the problem  IF_EX_BBP_DOC_CHANGE_BADI~BBP_SC_CHANGE

  • How do you increase the video size with a button?

    I'm trying to set up a demo for a meeting. I want to show how
    you can increase the size of the video.
    Example:
    http://video.google.com/videoplay?docid=-1532523169750528353
    There are two buttons in the bottom right corner of the
    player that will increase the video size.

    I havn't tried this but I would thinkg that this could work:
    If you have a video object on your stage (the object that the video
    actually plays in) you could probably make a button that simply
    changes the dimensions of it such as:
    setProperty("theVideoPlayer",_height, 240);
    setProperty("theVideoPlayer",_width, 320);
    The movie should adjust to fit the screen, however if you
    make the movie larger than or a different aspect ratio than the
    original, it will be blurred or distorted respectively. Make your
    original movie, therefore, at the largest size you want it to be
    seen. Keep the aspect ration the same always.

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • How to create Using Formatted Text Field with multiple Sliders?

    Hi i found the Java Sun tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html very useful, and it tells how to create one Formatted Text Field with a Slider - however i need to create Formatted Text Field for multiple Sliders in one GUI, how do i do this?
    my code now is as follows, and the way it is now is scroll first slider is okay but scrolling second slider also changes value of text field of first slider! homework due tomorrow, please kindly help!
    // constructor
    label1 = new JLabel( "Individuals" );
    scroller1 = new JSlider( SwingConstants.HORIZONTAL,     0, 100, 10 );
    scroller1.setMajorTickSpacing( 10 );
    scroller1.setMinorTickSpacing( 1 );
    scroller1.setPaintTicks( true );
    scroller1.setPaintLabels( true );
    scroller1.addChangeListener(this);
    java.text.NumberFormat numberFormat = java.text.NumberFormat.getIntegerInstance();
    NumberFormatter formatter = new NumberFormatter(numberFormat);
            formatter.setMinimum(new Integer(0));
            formatter.setMaximum(new Integer(100));
    textField1 = new JFormattedTextField(formatter);
    textField1.setValue(new Integer(10)); //FPS_INIT
    textField1.setColumns(1); //get some space
    textField1.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField1.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField1.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField1.selectAll();
                    } else try {                    //The text is valid,
                        textField1.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    label2 = new JLabel( "Precision" );
    scroller2 = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 8 );
    scroller2.setMajorTickSpacing( 10 );
    scroller2.setMinorTickSpacing( 1 );
    scroller2.setPaintTicks( true );
    scroller2.setPaintLabels( true );
    scroller2.addChangeListener(this);
    textField2 = new JFormattedTextField(formatter);
    textField2.setValue(new Integer(10)); //FPS_INIT
    textField2.setColumns(1); //get some space
    textField2.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField2.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField2.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField2.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField2.selectAll();
                    } else try {                    //The text is valid,
                        textField2.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    // State Changed
         public void stateChanged(ChangeEvent e) {
             JSlider source = (JSlider)e.getSource();
             int fps = (int)source.getValue();
             if (!source.getValueIsAdjusting()) { //done adjusting
                  if(source==scroller1)   {
                       System.out.println("source ==scoller1\n");
                       textField1.setValue(new Integer(fps)); //update ftf value
                  else if(source==scroller2)     {
                       System.out.println("source ==scoller2\n");
                       textField2.setValue(new Integer(fps)); //update ftf value
             } else { //value is adjusting; just set the text
                 if(source==scroller1)     textField1.setText(String.valueOf(fps));
                 else if(source==scroller2)     textField2.setText(String.valueOf(fps));
    // Property Change
        public void propertyChange(PropertyChangeEvent e) {
            if ("value".equals(e.getPropertyName())) {
                Number value = (Number)e.getNewValue();
                if (scroller1 != null && value != null) {
                    scroller1.setValue(value.intValue());
                 else if (scroller2 != null && value != null) {
                    scroller2.setValue(value.intValue());
        // ACTION PERFORMED
        public void actionPerformed(ActionEvent event) {
        if (!textField1.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField1.selectAll();
        } else try {                    //The text is valid,
            textField1.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
             if (!textField2.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField2.selectAll();
        } else try {                    //The text is valid,
            textField2.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
    ...

    if :p3_note_id is null
    then
    insert into notes (project_id, note, notes_month, notes_year) So, p3_note_id is NULL.
    Another option is that you have a trigger on table NOTES that generates a new note_id even for an update.

  • How do you delete records from table with data in a select option

    how do you delete records from table with relevant to data in a select option..how to write coding

    Hi,
    Try
    if not s_select_option [ ] is initial.
    delete * from table
    where field in s_select_option.
    endif.
    commit work.
    Be careful though. If select option is emty, you will delete the entire table.
    Regards,
    Arek

  • How do you clear call log

    How do you clear call log without deleting contacts of people you called or you called? On the Droid 2 it says clear but now I have Fasinate and I only saw delete so I clicked delete and it deleted the contacts.Is there a way to clear history of calls with out deleting the person?

    roachman55 wrote:
    Thanks I will look for that as like I said the Droid 2 gave option of clearing call log but what I see on Fasinate is just delete and it deleted contacts that I had called or called me. Thanks again and will check the preferences
    fascinate got option delete, and yeah it deletes but not contacts... only your logs... your contacts are there intact in your contacts...

  • How do you clear emails on the ipad search pad?

    How do you clear information on the ipad search pad?  And how do you prevent emails from being saved there?  I thought once you deleted email that it was gone permanently.

    Something weird is going on then. Try the basics, restart, reset or quit all apps and restart.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    To quit all apps - Go to the home screen first by tapping the home button. Quit/close open apps by e w the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • How do you clear apps using new update ios7

    how do you clear apps with new ios 7

    This is useful!
    https://www.youtube.com/watch?v=LShpslMEY-0

  • How do you clear ALL the music from an iPhone so you can reload a fresh copy?

    How do you clear the iPhone of ALL music so you can load a fresh copy from iTunes?

    Sync it with iTunes.
    There's no need to "clear" it first.
    If it is not selected to sync, it will remove it from the iPhone.

  • How do you clear everything, back to original blank phone?

    Hi all!
    Ok, after 1 month of this phone, I have had it, and want to sell it (probably ebay) and need to know how to clear all info off of it, and return to original new settings. Also, how do you clear the phone w/ blackberry so someone else can register it?
    Thanks so much for any help!
    Solved!
    Go to Solution.

    Hello,
    Please follow these guidelines for instructions.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How do you use new ipod nano with itunes 10.6.3?

    How do you use new ipod nano with Itunes 10.6.3.  I have MBP and it lists itunes 10.6.3 as most current version and won't let me install itunes 11

    The seventh generation iPod nano requires at least iTunes 10.7 and Mac OS X 10.6.
    (85225)

  • How do you clear system and application logs in a server?

    Hello all,
    How do you clear system and application logs in a server?
    thanks,
    mike

    go to start button,all programs,assosories, System tools T event viewer. now select application & rt click & clear & do not save.similarly do for sytem too.

  • How do you clear google search history

    How do you clear google search history. I tried the clear history in settings and all the old searches are still there

    In Safari, use the open book symbol to go to bookmarks. At the top of the list is "History", tap history and then tap the clear button on the bottom left of the screen.  That clears the search history as well.

Maybe you are looking for

  • Can not transfer Movies or TV Shows from iTunes to Apple TV any more

    Hi, I've been having syncing problems lately, but this latest one I can't solve. My iMac is running 10.6.3 with iTunes 9.1.1 (11). When I sync between the Mac and the Apple TV, everything (music, photos, podcasts, playlists) gets copied except movies

  • How can I turn on the Location service of my iPad 2 32 GB?

    I just bought an iPad 2 and iPhone 4 yestersday. I want to turn on the location services on my iPad 2 32 GB. When I go to settings > Location Services, I saw it was off then i tried to turn it on, but however, the on and off slide is grey.... that me

  • IOS5 and iPad question

    I just upgraded my iTunes and iPad to be on iOS5. My iPad no longer syncsmovies or photos - iTunes indicates they are synced, but nothing on the ipad. HELP!  It also appears the only way to see music content from iTunes is to now upload to the Cloud.

  • Exchange 2013 CAS server returned '500 Message rejected'

    Hi, all. Exchange 2013 with CAS server and 2 mailbox servers. Health checks are all 100% healthy. One of our users cannot receive email from an external user. Our CAS server keeps rejecting the message. I can trace the message and see that it did ind

  • Can a USB cable be used to transfer data from imac to macbook pro

    can you transfer data from an IMAC to a macbook pro with retina display using a USB connnection, or is there another way to do it?  My imac has USB and firewire bit macbook does not have firewire