How do I keep fields hidden until a numeric value is entered including 0

I have a field that keeps other fields hidden until a numeric value is entered into it...
My current script is:
var showHide = event.target.value > 0
? display.visible : display.hidden;
this.getField("Increase DecreaseRow1").display = showHide;
this.getField("Amended BudgetRow1").display = showHide;
And it works except when a "0" amount is entered, the fields remain hidden. I need to allow the "0" amount to unhide the fields so, I've tried changing it to:
var showHide = event.target.ValueAsString != ""
? display.visible : display.hidden;
this.getField("Increase DecreaseRow1").display = showHide;
this.getField("Amended BudgetRow1").display = showHide;
but that makes the fields I want hidden visible, even without an entry.
Any ideas?
I'm using Adobe Acrobat XI Pro.
Thanks in advance for any help!

I use the custom JavaScript validation of:
if(event.value == 0) event.value = "";
for the field with the calculation. If one uses a currency symbol or the percentage format then additional coding is needed to set the format to a number without the currency symbol for zero values and the desired format for the currency or percentage.

Similar Messages

  • How to make a field read only at run time by entering the value in another field.

    Hi Team,
                  Recently i got a requirement , i Have 2 dff's at header level and line level related to down payment ,and the DFF having two fields such as amount and if i enter amount that should be converted into % then populate the total amount field, at the same time % field should be gray out . if i give %(percentage) then amount field should be grayed out(read only) and then it should populates towards the total amount at header level.
    Can any one help me on this issue.
    Thanks,
    raghava

    I would to elaborate this issue...
    I have DFF's enabled at Header level and line in Purchasing Module -->Buyer WorkBeanch --> Order page here they did, as "Details". Details contains two Filed's
    1. Amount
    2.Percentage (%)
    Requirement :
    i.if i enter "down payment amount" then "down payment %" going to become read only. vise verse.
    ii. If I enter "down payment amount " or "down payment %" at header level then not allowing to enter at line level .
    thanks,
    raghava

  • How can I force an "invisible" object to become "visible" when a numeric value is entered?

    So I’m trying to force an “invisible” subform to switch to “visible” when a numeric value greater than or equal to 22 is input into a numeric field.
    I can’t get the following javascript code to work properly with any event. I’ve tried the change, calculate, validate, events and a few more to no avail. The only event that kind of works with the javascript code I’m using is the validate event. When I input the code into the validateevent, the invisible subform becomes visible when an amount equal to or greater than 22 is entered, but when ANY amount is input into this field, an error message pops up that says “NumericField4 validation failed” and the user has to click “Ok” to get rid of the pop up box.
    if (this.rawValue <= 22) {
            Approval23.presence = "hidden";
    if (this.rawValue >= 23) {
                Approval23.presence ="visible";
     Here’s a link to my .pdf: http://www.filedropper.com/salgovform
    The object field that the javascript code is contained in is called: NumericField4 (a.k.a. New Job Grade)
    The subform that I want to become visible when a number greater than 22 is input into NumericField4, is called Approval23.
    I’ve based the javascript code I used on information I gathered from the following thread and associated .pdf . . .
    Thread:
    http://forums.adobe.com/message/1982919
    PDF in thread with the javascript code:
    http://forums.adobe.com/servlet/JiveServlet/download/1981437-8059/Sample_SW.pdf
    I’m pretty sure I’m just missing one little thing that’s throwing everything off!
    Any help would be GREATLY appreciated.

    Hi,
    The following works in the exit event of the numeric field, where the language is set to JavaScript:
    if (this.rawValue <= 22) {
         Approval23.presence = "hidden";
    else {
         Approval23.presence = "visible";
    Here is your form: https://acrobat.com/#d=3gRNt6WBY2bE0K7en4CnSA
    Hope that helps,
    Niall

  • How to pass variable in the place of numeric value?

    Hi,
    my requirement is i want to validate the selection screen block width.
    I have created tabbed selection screen.
    i need in which variable tab lengh values will be stored
    ex:-
    selection-screen: begin of tabbed block MYTAB for 10 lines,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
    end of block MYTAB.
    here in the above code i want to pass variable instead of directly numeric value as 10.
    because based on some conditions i want to change the number of lines.
    how to do this...plz urgent, i will give all the points to anybody who given good answer.
    Thanks in Advance,
    venkat n

    Hi!
    And that's why God created macros.
    DEFINE seltab.
    selection-screen: begin of tabbed block MYTAB for &1 lines,
    TAB (20) button1 USER-COMMAND push1,
    TAB (20) button2 USER-COMMAND push2,
    end of block MYTAB.
    END-OF-DEFINITION.
    DATA: lv_lines TYPE i VALUE 10.
    seltab lv_lines.
    Regards
    Tamá

  • How to put 'NA' in text filed with numeric value

    Dear fellows,
    I need to do one think in my forms, and that is I want to put value 'NA' instead of null values in numeric field in my forms, when no number is inserted than NA will be written there.
    Could it is possible or not, if so kindly help me in this regard I will be thankful.

    Dear Gerd Volberg
    Thanks dear for your reply, one think more, if I need to do like this that in one form data is entered and on second form I just need to display the numeric value but when a null value occur just NA is shown. Could it possible.
    If so please help me.

  • When I open certain websites I use frequently(like financial trading sites), they seem to close automatically after about an hour. How do I keep them open until I decide to close them?

    I recently installed 4.01. Now when I open Firefox, it only seems to stay open for about an hour or so, and then closes automatically.
    How do I fix this and keep it open?

    That may have been coded on those websites and is done automatically via JavaScript. If it didn't happen previously then it is possible that the used code doesn't work in previous Firefox version. Many of such sites do that and one hour looks to me as already quite long if you leave a page unattended.

  • On a page change, GIFs in the orignating page stop animating - how can I keep them animating until the page actually changes?

    On some pages in my application I put up a mask and a loading dialog when changing page. This dialog has a GIF as a background image as a loading/waiting indicator. This GIF plays one or two frames and stops when the pages begins its redirection to the target page.
    Page change initiated using javascript: location.href ...
    FF 19 MAC OSX

    You can render the ebook on an instructional application called Zankura. Not only can you control the screen scrolling, but all the students can freely annotate with their stylus. www.zankura.com.

  • How do I keep the front panel on top of every windows (including non-LabVIEW windows)?

    The question above states it all.  Basically I have a progress bar the tells the user to wait and I want it to remain in front of anything that pops up while it is running.  My program opens up and deploys a VeriStand project and while it is doing that I dont' want the user to be able to do anything in the front panel that launches it.  When VeriStand launches it goes in front of the status window and you can't see it anymore.  I want to prevent this from happening and keep it in front of any VeriStand windows that pop up when I call the executable and the deploy an SDF.  I did take a look at the WINUTIL.llb but it keeps either 1) giving me errors or 2) not keeping it on top of anything but the main front panel.
    Any fixes or alternative solutions would be much appreciated.  Thank you.

    I did read that earlier and I just think I don't know enough of what I'm doing with library calls to make it work.  I kept getting errors and gave up on at the end of the day yesterday.  I'm working on other problems since this isn't a major one and figured I'd post it and see if anyone already had a solution to it.
    Thanks for the help though, it's appreciated.

  • How to covert exponent figure in char to numerical value

    Hi all,
    I am getting value 3.0000000000000000E+01 in one of char field in the output of my report , But I want it to be display as '30' . Please help , and tell how to convert the value
    Thanks and regards,
    V.Kumar

    Hello,
    - You will find below the code that will answer to your question :
    REPORT ztest.
    DATA : wv_count TYPE sy-dbcnt.
    DATA : wv_fltp  TYPE imrg-readg.
    DATA : wv_char  TYPE char22 VALUE '3.000000000000E+01'.
    MOVE   wv_char  TO wv_fltp.
    WRITE  wv_fltp  TO wv_char EXPONENT 0 DECIMALS 0.
    WRITE / wv_char.
    Cordialement,
    Chaouki.

  • How can I get HyperTrend to display the numeric value output of a CHOOSE statement?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

  • Need Help: old comp. crashed, how do I keep what I have?

    Its hard for me to say. But I'll give it a shot. I synced my iphone with my itunes on an old computer. That old computer crashed suddenly. Now, I have a new computer and I'm putting together a new library. So this is my dilemma, I bought several ringtones, music, etc. and wish to add it to my new library. I dont want to lose what Ive already bought. But, if I choose to sync, itunes tells me that they will completely wipe out my iphone and add what my new library has. How do I keep everything? What can I do?

    iTunes includes an option to transfer content that was purchased from the iTunes Store from an iPod or iPhone.
    Without syncing, at the iTunes menu bar go to File and select Transfer Purchases From - the name of your iPhone. This is for content that is available on your iPhone that was purchased from the iTunes Store only.
    Other than that is one of the reasons why maintaining a backup of all your important data including your iTunes library stored on an external drive or some other media used for backup purposes only is so important.

  • How to restrict user's inputs to F4 help Values?

    Hi Experts,
    I have created a custom infotype where i have a custom search help created for one of the fields, the problem is that even if i give values other than the values in the search help the infotype doesnt throw any error and gets saved.
    So can anybody explain how to restrict the field only to search help values.
    Thanks,
    Revanth.

    Hai.
    Check the example it may help you.
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Regards.
    Sowjanya.b.

  • Lost my iP 3G - How do I use iP 2G until iP 4 is here and keep all my data?

    Lost my iP 3G - How do I use iP 2G until iP 4 is here and keep all my data?
    Ok so this is a bit complicated - I left my iPhone 3G in a cab last weekend and unfortunately it's lost for good. I still have my original iPhone 2G and have already went to AT&T for a new Sim Card. I want to use the old phone until the iPhone 4 is out in 2 weeks..... My question is how do I Restore/Back Up/Sync the old iPhone so I can retrieve all the information from my lost 3G and not lose any of the data. I know a lot of the newest software (3.1.3) is not supported on the old iPhone. In addition, how do I make sure that I am able to transfer all the origninal data from my lost 3G, as well as all the new data that I acquire on the iPhone 2G i'm using now onto the new iPhone 4 when I get one in a few weeks???
    Very confusing I know, I just want to make sure all my data is safe and I don't make a blockheaded mistake of erasing some or any of it.....
    Thanks to all you iPhone geniuses out there willing to provide feedback!!!

    Well thank you for knowing the Terms of Use like it was your job Mr. Ian Parkinson. Forgive me for being the only person ever to sign up on here that simply clicked through to agree to terms without reading everything line by line. Yes I have only a handful of posts, I simply had a single question that I assumed would be answered quickly if I posted it into similar categories. It's too bad I couldn't have consulted with you first, the All Knowing and All Great Oz who has memorized the entire Terms of Use and has 6,000 posts on here..... I am simply not worthy in your presence, please strike me down with a fireballs from your eyes and bolts of lightning from your arse!

  • How to keep Field symbol reference

    HI ALL ,
    I have method with that assign field symbol on it and I want to keep the reference of it ,
    does it impossible ?
    For instance
    ASSIGN cs_structure TO <ls_structure>. "both are type any and are always structure with fields f1...fn
        assign_request(
          EXPORTING
            is_fields = ls_fields
            ev_out    = es_field "F2
          CHANGING
            cs_str  = <ls_structure>
    es_field = '1'
    Here I have method that in the method I always need to return  field from the structure  (es_field - I dont know how to define it
    type any or type ref to data )
    my question is assume in <ls_structure>  I have field called F2 and I want to receive it but to keep the reference i.e.
    if i do after the method call es_field = '1' the field F2 on structure <ls_structure>  will contain '1'.
    There is a way to do that ?
    Regards
    Joy

    HI Naimesh
    I already try to define es_field as type ref to data but the issue is that for instance
    field symbol  <lv_field> type any.
    ASSIGN cs_structure TO <ls_structure>.
    inside the method assign_request I am doing ...
    ASSIGN COMPONENT 'F2'  OF STRUCTURE cs_str TO <lv_field>.
    GET REFERENCE OF <lv_field> INTO ev_out.
    call to the method
        assign_request(
          EXPORTING
            is_fields = ls_fields
            ev_out    = es_field 
          CHANGING
            cs_str  = <ls_structure>
    and after the method assign_request
    ASSIGN es_field->* to <lv_field>.
    <lv_field> = '1.'
    Now I except that cs_structure and <ls_structure> that have field F2 you see that value '1' but its not working ,
    what i miss here ?
    Regards
    joy

  • How can I keep the field in the same page

    How can I keep the field in master frame in the same page of the detail frame?
    They are in the different pages sometimes?
    Thank you.

    I believe the OP has a question similar to mine...
    I have several groups, and the master for each group is only one line, and the detail is between 1 and five lines, like so:
    A
    A1
    A2
    B
    B1
    C
    C1
    C2
    C3
    ...The problem is, sometimes only the master record gets printed at the bottom of the page, and then the detail is printed at the top of the next page. I don't need each group on it's own page. I just want to be sure that if the detail can't fit on the page with the master, then I want the master to only print on the next page.
    Can you help with this?

Maybe you are looking for