LiveCycle ES3: need 3 fields to match before saving or printing form

Hi!
I have a form that contains different numfields that need to match before the user should be able to save or print the document.
These are the fields that the user have to fill in:
A = Total sum of people (one field) should be equal to the sum of B-H and I-O.
B-H = Seven different fields (in a group) where the sum of all seven fields should be equal to A (and the sum of I-O)
I-O = Seven different fields (in a group) where the sum of all seven fields should be equal to A (and the sum of B-H)
All fields are Numeric Fields and User Entered - Required
When these fields do not match I want a messagebox to popup with that info and when Ok button is pressed it should return to the form again.
If the fields match no messagebox should popup and the document should continue to save (or print).
This means that you can't compare the fields until the user want to save or print the form...
I use Formcalc in Livecycle and I it would be nice if someone can help med with the code!
Thanks in advance!

Yes, you would use completely different code. Here is a simple example that enables two text fields after the text field to which it is attached has a value (isn't blank):
// Validate script for text field
(function () {
    // Get references to the subsequent fields to control
    var f1 = getField("other_text_field1");
    var f2 = getField("other_text_field2");
    // Reset the fields
    f1.value = f1.defaultValue;
    f2.value = f2.defaultValue;
    if (event.value) {  // Show the fields if this field is not blank
        f1.display = display.visible;
        f2.display = display.visible;
    } else {  // Otherwise, hide the fields
        f1.display = display.hidden;
        f2.display = display.hidden;
Note that the script can be simplified if you use a heirarchical naming convention for the subsequent fields. We discussed a similar situation just yesterday at: http://acrobatusers.com/forum/forms-acrobat/set-form-skip-question-depending-answer-anothe r
so you could look there for more information on this approach.

Similar Messages

  • Need an Exit/BAdI before saving RFQ using ME41

    Hello,
    I need to put some check before an RFQ is created using ME41. Using the package ME, I had searched for Exits/BAdIs, but can't find one which says this can be used for ME41. Can someone give me which of the User Exits/BAdI can be used for my pupose? Thanks in advance.
    Regards,
    Abijith

    When the business saves an RFQ document via ME41, ME42 or ME47 tcodes, SAP will not overwrite the existing Purchasing Group value in the corresponding PIR(Purchasing Information record). can u suggest any user exit/badi?

  • Force spell check before save or print form

    Hello,
    I'm using LC Designer 8.2 to create a form & wonder if there a way to set up or scripting a force spell check (like before email send - a spell check box pop up when the send button is selected). 
    Thanks,
    Trang

    See:   http://forums.adobe.com/message/2238533#2238533

  • Saving a PDF-form with nested forms and tables

    I created a multiplaged form with a couple JS-functions to add table-instances and complete tables and a few more. I saved the form with additional rights to make sure my users can save the form and its content using Adobe Reader. Now whenever the form is saved, some - but only some - information disappears, respectively isn't saved but replaced through the default content. I created quite some forms before and never ever had this problem. I'm using LiveCycle Designer ES 2 )but experienced the same problem when using ES 3) and Adobe Reader X.
    Filled out form before saving:
    Filled out form after saving and re-opening:
    Any ideas?

    Hello
    When you work with live cycle designer you create your form and you save it. Then, when you want to send it to people you use the assistant with create 2 other different files :
    1) A publication form that you will send by mail
    2) A blank form that you will fill with information the user sent to you
    So, call the assistant create the 2 files but don't send them to people and save them locally. Open the second file and fill it in reader, you will see you will save change.
    Regards

  • Pop up Window before saving remembering the need (forcing) to fill required fields in a form

    Hi!
    I searched the "old" forum and have very good help from UVSAR but unfortunately I'm not able to access my message sent to that forum anymore.
    [I could never thank all the people who answered because I keep receiving "Your submission has triggered the spam filter and will not be accepted.""]
    I've have never use Java scripts in my life: I started about three days ago.
    1) I'm using Adobe Acrobat Pro X (Windows 7)
    2) I've created a form using Microsoft Word and save it as a pdf file.
    3) After I created a form using Acrobat Pro X;
    3.1.) This form it's not going to be submitted over Internet. It will be send by e-mail to some persons. They will receive it, fill in the form and send it back to me via e-mail. Note: I will save it with extended rights in order to allow to be read with acrobat reader (I'm the only one of the group having Professional edition).
    4) In that form I've created some text fields (for now it's just what I need - no radio buttons, dropdown
    menus, and so...)
    5) Choosed Properties and marked 7 fields as "required";
    6) Used a script I found in here: http://forums.adobe.com/thread/784322 (thank you for the authors of the thread)
    if (!event.target.valueAsString) {
    app.alert("My text My text", 3);
    7) This script allows me to remember people to fill that 7 specific fields (when using mouse or tab).
    8) So... What I really need? Here are the reasons for my request for help:
    8.1.) When people use the Acrobat Reader Save button (not a button I created inside the form) it will pop up an alert message. Users will receive a pop up window telling them they need to fill those fields before saving the form and send it back to me. Can someone share a script, please? Thanks in advance.
    8.2.) Is there a way to colorize the fileds that need to be filled? Again I only learned where to insert a java script yestaerday sou I'm not able to write one. I'm sorry for my newbie questions.
    8.3.) Last question: In one of the fields there will be an e-mail address. On the end of the form I want to create a button like "Send by e-mail" and When someone press that button the e-mail will be sent to the address that was written in the earlier specific field. How can I do this (link a button to an e-mail address in a specific field)? Can someone help me with a script or ideas? Hope I was clear.
    8.1.) UVSAR sent me the following code that works fine untill I save the document for the first time. Affter that he never shows me pop up window again.
    var isFilled = true;
    for (var i=0;i < this.numFields;i++){
    var f = this.getNthFieldName(i);
    if (this.getField(f).required && !this.getField(f).valueAsString) isFilled = false;
    if (!isFilled) app.alert("You must complete all the required fields");
    8.3.) With the help of UVSAR I used:
    var mailto = this.getField('emaddr').valueAsString;
    if (mailto!='') this.mailForm({ bUI:true, cTo:mailto, cSubject:"This is the subject", cMsg: "This is the body of
    the mail." });
    else app.alert("Cannot submit form until the email address field is completed");
    but gives me an error (Note: I named the filed with e-mail "emaddr")
    Once again Thank you so very very much to all the kind people who take their time to share knowledge...
    I'm not a native speaker, sorry for some errors
    Best regards
    AC

    Hi Winnie
    Unfortunately I have been sick and did not read the message before. I apologize.
    I have not received help beyond what is on the page. But when I get I tell you.
    I hope you can get answers. If you receive, I ask that you share with me.
    thank you very much
    best regards
    AC
    Date: Mon, 27 Feb 2012 09:33:10 -0700
    From: [email protected]
    To: [email protected]
    Subject: Pop up Window before saving remembering the need (forcing) to fill required fields in a form
        Re: Pop up Window before saving remembering the need (forcing) to fill required fields in a form
        created by Win_Form in Forms - View the full discussion
    Hi ACI wonder if you can share any responses on to your question above?I too have never used a script but, I have the same problems as you in regards to building a form. And wants to have the same 'protection' and message reminders for the end users. Any information, including a script and/or a contact email of experts you can share with me will help tremendously. Thank you so much in advance. Winnie
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4232307#4232307
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4232307#4232307. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Forms by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Create Credit Memo (VA01) - Problem of checking a field before saving

    Hello!
    In tcode VA01, why a field (ex. Customer Group) is checked to be filled before saving in case of a Standard order (type OR, or for us is ZOR), but not in case of a Credit Memo (type CR, or for us is ZCR) ? Is this Config problem? If yes, do you know how to config? If not, do you know any User-Exits I should use? I've tried some but didn't work.
    Please help if you can. Thanks!!

    Hi Timmy,
    Please go to include MV45AFZZ and try the user exits
    USEREXIT_SAVR_DOCUMENT
    in here VBAK values are present in XVBAK and VBAP values in table XVBAP....
    Write the required code here and see if it solves our problem
    Every time user clicks the 'SAVE' button it has to go through this exit
    Regards
    Byju

  • Check mandatory fields before saving

    Hello,
    In my Z-program, how can I check all mandatory fields in a dynpro before saving?
    Is there any function to do that?
    Thanks!!!

    Hi alberto,
    1. If the fields are mandatory (as set in the field attributes while designing the screen),
    2. then we don't have to write any additional logic for the same.
       The system will AUTOMATICALLY check for it, and issue appropriate message.
    regards,
    amit m.

  • HT4914 I need to cancel iTunes Match before I can change my credit card details? How do I do that?

    Someonme PLEASE remind me why I hate Apple so much!
    Everything is SDO much work and drama to change or fix!
    I've recently relocated to the US and needt o update my credit card details. I did the address, etc.
    I keeps telling me that I need to cancel iTunes Match before I can change my credit card details? How do I do that?

    You can't do it yourself. If the unspent balance is at least as much as the value of the gift card, ask the iTunes Store staff to put the balance back onto the card. If not, it's not possible at all.
    (74817)

  • Net value of sales order before saving in VA01

    Hi there,
    I'm currently working with the transaction VOFM whereby i need to get the <b>net value</b> of the current sales order in order to compare with a deposit value which the customer has made.
    a condition type is activated whenever the net value is < the deposit which the customer makes,i.e when sy-subrc EQ 0.
    My problem is that the routine in VOFM(where i have added my code),is triggered before i save the order, hence all i get as net value is always 0.00. That routine is again triggered after i save as well, but it doesnt work as i expected even if i get the net value then.
    I have in fact used the routine USEREXIT_PRICING_PREPARE_TKOMP of include MV45AFZZ, where i could get the net value from the field XVBAK-NETWR <b>after saving the order</b>.
    i thought that now it gets the right value, it'l work as expected but the fact that the VOFM routine is triggered before saving(hence net value 0.00), the condition type doesn't change after i save.
    Hence, my condition type is not being applied properly because the condition type is being activated already when it get the net value 0.00.
    Can anyone please tell me if there is a way to get the net value before saving?
    Thanks for your help.
    Regards,
    Meenakshi

    Hi,
    I have in fact used export flag to memory in FORM USEREXIT_PRICING_PREPARE_TKOMP from which i get the net value after saving.
    In fact, i have figured out the problem but still cannot solve it.
    What happens i that the VOFM routine is triggered more than once, hoewever, the first time it is triggered, i still havent got that net value. In this pass, when the routine ends, sy-subrc eq 0. Upon the next pass to the VOFM routine, i set sy-subrc to 4(condition type not activated), however the result is wrong. The condition type is activated still.
    if i do the contrary, i.e set sy-subrc to 4 on the first pass to VOFM routine and then set sy-subrc to 0 second time(condition type needs be activated), the condition type is not activated.
    what i dont understand is why the VOFM routine is only keeping the initial value of sy-subrc?Any ideas?
    Also, am doing my validations and setting sy-subrc in the form kobev_900.
    Am not using the form kobed_900 at all. Does this make a difference?
    Also, how can i do the validation only when repricing was called form SAVE process?How do i put the condition?
    Thanks for the help.
    Meenakshi

  • Check on vendor email address change before saving PO

    Hi All,
        I need to check Is there any change in Vendor Email address in PO before
    saving. I am trying to find userexits.
    I found some like EXIT_SAPMM06E_012, But here I am not getting complete
    Vendor address...
    Req: I am maintaing multiple email address for Vendor at PO header level.
    Here is the path:  PO Header --> Address tab --> Click on Address Details
    --> Here we can maintain(Insert/ Delete/Change) multiple e mail address.
    So I need to check is there any change in email address before saving.
    Could you please any body help me on this....
    Thanks
    Rays

    Hello Rays,
    One base question,
    Are you going to check the vendor email address manually before saving the PO?
    The vendor address in the puchase order is copied from the vendor master so you can maintain email address (single or multiple) in the vendor master before creating the purchase order. At the time of purchase order creation/save, you can change the default email address and use this to trigger PO to vendor.
    By the way, user exit EXIT_SAPMM06E_012  (Check Customer-Specific Data Before Saving) is used for custom field not for SAP std field.
    Hope this helps.
    Arif Mansuri
    Reward the points if answer is helpful.

  • Ho to Generate the Numeric Values Automatically before saving the records

    Hello to everybody,
    I have a data block naming “BILL” consisting of the following 3 field.
    1. Sr_No
    2. Bill_Amount
    3. Description
    This Data Block consist 10 records at a time.
    I want that whenever I insert records in the above data block.
    Serial No should automatically be generated.
    For this I have applied the following code in “WHEN-NEW-ITEM-INSTANCE” trigger.
    <CODE>
    SELECT NVL(MAX(Sr_No),0)+1 INTO :BILL.Sr_No FROM BILL;
    </CODE>
    Whenever I insert records in the BILL data block, the first row automatically generates the “Sr_No”, but when I move to the next record, (remember currently I have not saved the record), the same value which appeared in the previous record appears in the Sr_No field.
    For example, when I insert records for the first time in the BILL, the Sr_No field automatically generates value “1”, but when I move to the next record while not saving the first record the next row still generating value “1”, while it should be value “2” and so on.
    Note that I want that before saving the previous record when I move to the next row, the Sr_No should generate the next continuous value like in example.
    Please help me to solve out this problem.

    You have practically scratched you left ear with your right foot while jumping on the left foot :-)
    Seriously, you guys don't need to go to all this trouble.
    If you want a serial number incrementation, all you need to do is to either select the max value + 1 from the table or select the next value from a sequence in an PRE-INSERT trigger on block level, and that's it!!!!
    Tony

  • MB1B User exit or Badi before saving transaction

    Dear friends ,
    I need to identify a user exit or badi that I can use to populate one field in tcode MB1B before saving.
    How could I find it ?!
    best regards,
    Ale

    Hi Alessandro,
      Hope you find this useful..
    For Finding user exits
    [http://www.erpgenie.com/sap/abap/code/abap26.htm]
    Find a BADI called from within an SAP transaction
    The following steps will allow you to simply find a BAPI that is linked to an SAP transaction code.
    1. Execute transaction SE37 or SE80 and find function module 'SXV_GET_CLIF_BY_NAME'.
    2. Insert a breakpoint in it.
    3. Now go to the SAP transaction you want to find a BADI in.
    4. When you execute it, it will stop at the above function module.
    5. Look at the value of field EXIT_NAME.
    6. This will provide you with the name of the BADI that is available in your SAP transaction code.
    This technique can be used to find out the BADI for given transaction.
    Follow below steps.
    Go to transaction ST05, select buffer trace and click on activate trace button.
    Now run your transaction code for which you want to find out the customer exits.
    Go back to ST05, click on deactivate trace and display trace.
    A popup screen "Set Restrictions for Displaying Trace" appears. Now, filter the trace on Objects V_EXT_IMP and V_EXT_ACT
    All the interface class names of view V_EXT_IMP start with IF_EX_. The BADI name is the name after the IF_EX_.
    E.G: in the name IF_EX_ME_PROCESS_PO_CUST BADI name is ME_PROCESS_PO_CUST.
    How to find BADI
    1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
    2. In 'Display' mode, go to 'Methods' tab.
    3. Double click the method 'Get Instance' to display it source code.
    4. Set a breakpoint on 'CALL METHOD cl_exithandler=>get_class_name_by_interface'.
    5. Then run your transaction.
    6. The screen will stop at this method.
    7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.
    Regards

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • Need field validation help

    I have read the all documentation, but still cannot get what I believe is a simple field validation to work properly. Can somebody assist?
    Here is the situation. I have two fields: one is a checkbox and the other an integer field. ( If the integer field is 0 or null ) AND (the checkbox is not checked or null) then we need to show the user an error message. Seems simple. I’m trying to take baby steps to get this to work so I understand it, but have not been successful.
    I know the message only triggers if the validation equates to False. I believe that field validations trigger whenever a record is save no matter if the field that has the validation was changed. If this is not correct, please advise.
    Starting out simple: I added the follow validation to the checkbox field: [<integerField>] <> 0 The data in the UI clearly shows a 0 in this field, but when I update the record, the error message is not display. Can somebody explain why? Is my syntax wrong?
    I need to understand how to correctly compose the field validations and also how to account for ‘null values’.
    Any help would be greatly appreciated.
    I also tried this on the checkbox field: ( [<checkboxfield>] LTGT 'Y' AND [<Integerfield>] = 0 ) but again it does not display message. LTGT = < >
    I wish Oracle had a webnair on how to write field validations. :)
    Thanks.

    Validation can be a trial and error exercise. There are a couple of key points to remember.<ul><li>First, always check the sytax before saving. This will only catch some very basic issues, but it can helpful.</li><li>Second, always click save for the Field Edit before testing. I know I forget to do this half the time, and it can be frustrating to find out that the validation would have worked if you had saved the change to the field.</li><li>Another key is to allow for the validation to be skipped during integration or by administrators. This can be managed with the ExcludeChannel() and UserValue() functions.</li><li>Finally, there are a couple of key points to be understood about when field validation rules will fire. The following circumstances prevent a field validation expression from being evaluated:<ul><li>A field is left blank when the record is created. Field validation does not force a value to be required.</li><li>A field has a pre-existing invalid value, and it is not changed when it is updated.</li></ul></li></ul>
    With all of that said, let's discuss your problem. I think you want the validation to work as follows: <ul><li>If the number is greater than zero, do nothing</li><li>If the number is less than or equal to zero or null, then check to see if the flag is checked. If the flag is checked, do nothing, otherwise give a message.</li></ul>
    If that is true, you have a nested IIf statement. The statement would be similar to the one below. This would be for the number field, and you would repeat the same for the checkbox field. Note that in this expression, I am returning the value for the field being validated.
    IIf([<IndexedNumber0>] > 0,[<IndexedNumber0>],IIf([<IndexedBoolean0>]='Y',[<IndexedNumber0>],"Invalid"))
    Good Luck,
    Thom

  • Validation of Item Values before saving the form

    Hi,
    I have requirement in Oracle Forms, we give header information as per the requirement and the lines info of the specific header. In lines whe have two feild as type and amount. If the type is 'E' then we need to sum up the amount value as credit and if type is 'F' we need to sum up of those feild values as Debit and before saving the form we need to check the sum of Credit and Debit is equal or not if equal then we should allow to save the form else it should not. We can have multiple lines under single header..Can any body help on this..Its very emergency..
    Thanks,
    Maggi.

    Hi,
    In Customer-exit ILOM0001 read table IMPT_BUF[] from sap stack. It contains all enteries of measuring points.
    Use below mentioned code in above exits for your reference.
    FIELD-SYMBOLS : <fs_impt> type ANY TABLE.
    data : tab_impt type TABLE OF impt.
    ASSIGN ('(SAPLIMR0)IMPT_BUF[]') to <fs_impt>.
    if sy-subrc is INITIAL.
      tab_impt = <fs_impt>.
    endif.
    table TAB_IMPT is filled wilth all entries of measuring point while creating and changing functional location.
    Thanks,
    Vijay

Maybe you are looking for