Setting fields mandatory based on other fields

Hi,
In my adobe form there are 4 input fields(F1,F2,F3 and F4) and one field(F5) which is input optional. But if any field (F1, F2,F3 or F4) gets changed, the fifth field F5 has to be mandatory. I guess some java scrip is required but I dont have any idea on the same.
Please help.

we have a similar situation where a field must be filled in if a value is chosen in our dropdown box.
you can throw a popup message stating that the field must be filled...
JavaScript
xfa.host.messageBox("This is a message", 3, 1);
FormCalc
xfa.host.messageBox("This is a message", 3, 1)
A valid integer representing the value of the button pressed by the user:
u2022 1 (OK)
u2022 2 (Cancel)
u2022 3 (No)
u2022 4 (Yes)
Or what we did is just checked all the values after the SUBMIT and issued error messages in a message area letting the user know what they missed.

Similar Messages

  • Making a DFF field mandatory based on another field

    Hello All,
    We have a requirement where in we need to make a DFF field mandatory based on another field.
    example:
    DFF has two fields :
    Filed1 : values 'Email', 'Fax'
    Filed2
    If 'Email' is selected in 'Field1' then Field2 should become mandatory.
    Any inputs on this will be really helpful.
    Thanks & Regards,
    Satya.

    hi kumar3a,
    recently, i spent considerable amount of time wracking my brain on a similar problem. the nearest i came to a solution was when i used a forms personalisation. mind you, forms personalisation will not work directly on the DFF window, so it has to be approached in a roundabout sort of way.
    i got this information from an Oracle Support personnel - MOS Note 1078348.1.
    i would start with the flexfield segment as "not required", and then using Forms Personalization, i would make it "required". i would try to figure out how to establish a condition where the previous 'required' flexfield segment's value is checked to see if this 'not required' segment needs to be made 'required'. in theory, this should solve the issue. i gave up on it because the forms personalisation would need to cover WHEN-VALIDATE trigger event, and we had close to 100 validations going on through other preexisting forms personalisations, which rendered it near impossible to employ this method.
    best regards.

  • Making fields required based on other field input

    I am creating a form in adobe acrobat pro that employees need to fill in to show the clients they have worked for in a week. The form has 10 lines for them to fill in the date, client name, address etc for 10 clients. I want to make the client name and address fields required only if the date has been filled in in the first column. I can't make every row required fields as they may not have 10 clients that they have worked for. I have a send button set up so that all required fields are completed before the form can be sent. Can someone help me with the script I would need. I have worked out how to make the fields required if a check box is ticked but can't find any scripting for fields to be required if text has been entered in a specific field.

    You can use the custom validation script of the date fields. Let's say you
    want to make Name1 and Address1 required if Date1 is not empty.
    Use this code to do it:
    this.getField("Name1").required = event.value!="";
    this.getField("Address1").required = event.value!="";

  • Automatically populate fields in jsp documents based on other fields

    hello guys. I have a jsp document
    that has the following
    <af:inputText value="#{bindings.SourceDocumentId.inputValue}"
    label="#{bindings.SourceDocumentId.label}"
    required="#{bindings.SourceDocumentId.mandatory}"
    columns="#{bindings.SourceDocumentId.displayWidth}"
    binding="#{backing_transactions_editTransactions.docId}"
    id="docId">
    <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SourceDocumentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DocumentName.inputValue}"
    label="#{bindings.DocumentName.label}"
    required="#{bindings.DocumentName.mandatory}"
    columns="#{bindings.DocumentName.displayWidth}"
    binding="#{backing_transactions_editTransactions.docName}"
    id="docName">
    <af:validator binding="#{bindings.DocumentName.validator}"/>
    </af:inputText>
    And I have created the generated the backing beans automatically.
    public class EditTransactions {
    private CoreInputText docId;
    private CoreInputText docName;
    public CoreInputText getDocId() {
    return docId;
    public void setDocName(CoreInputText inputText7) {
    this.docName = inputText7;
    public CoreInputText getDocName() {
    return docName;
    I have a method in appmodule that has this
    public String getDocName(Number docId)
    {String docName;
    return docName
    on the document Id field I have to input a certain docId after I input the docId I have to populate automatically the docName based on the doc Id being given.
    question
    1. how can I set the document name automatically w/out submitting the page ?
    2. how can I use my backing bean to set the docName using the method in my AppModule.?
    Can anyone help me regarding this one.
    Thank in advance
    alvin.

A: automatically populate fields in jsp documents based on other fields

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

  • Making a field mandatory based on values in a drop down

    Hi,
    I am new to Javascripting on the Adobe Designer and we have a requirement to make a text field mandatory based on one of the values selected in a drop down list on the same form.
    When I say mandatory I mean we need to prevent the form from being Saved if this text field is not filled - specifically when a value (say "Promotion") is selected on a drop down.
    Please help me with the events under which the script needs to be placed and the scripting commands.
    Thank you!
    Neera

    Hi,
    You can put PPR event on EMAIL field. Catch that event in PFR and put your logic there like:
    if EMAIL is not null then make FORMAT field mandatory (for that u can catch that in PR)
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PM Notification - Hide fields based on other field's value

    Hello experts,
    I am looking for an user exit which allows me to hide some fields based on other field's value.
    For example, I have field 1 and field 2. When I open my notification, if the value of field 2 is 'aaa', field 1 has to be hidden.
    There should be an user exit but I can't find it...
    Thanks for your help!

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Marking Field Mandatory Based on a particular Product Selection

    Hi All,
    I have a different requirement, when I select a particular product names from the product picklist I have to make another field as mandatory. I dont have dynamic layouts to do this option.
    Is there anyway where I can make a field as mandatory based on a value selection from another picklist field?
    Thanks
    Natraj

    Hi, If the product ID = 1,2 or 3 and if the mandatory field is not filled set an internal field value to 1 using default field value and write a validation rule on that internal field forcing the user to fill in mandatory field. Extend the same using workflow using update field operation. Hope it helps
    -- Venky

  • Infopackage Abap Routine (Selection based on other fields?)

    Dear Friends,
    I know that Abap routine is used in infopackage to select or restrict using complex data selection.
    My requirement is to restrict Material no field based on 4 other fields. Is that possible?
    Actual condition is  to load Material no only if other 4 fields combination is new.
    Pls help.
    Guru

    Hi,
    Yes you can do this at infoPackage level using the ABAP routine.
    First read the Active Table of the DSO into internal table and do a lookup for the required four fields combination.
    If these four field are new allow the material number.
    Refer the below link for more help.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a05ac9fa-f44c-2c10-dbb8-ef54c102707c
    Regards
    Manjula.B

  • Fill DDL based on other field values in offline interactive adobe form

    Hi,
    I have a requirement where in i need to fill the values for a dropdown list  based on 3 other field values in offline adobe interactive forms which uses web service to interact with SAP.
    Note: I read many blogs and posts in SDN , but couldn get much info ab the same, so posting a new thread.
    Thank you.
    Regards,
    Soumya

    Hi Soumya,
    It is possible but a little bit tough and will make your form heavier.
    The solution is advisable only when there is not very much data required for the drop down(May be not more than 500 values as it will create performance issue).
    You can create a hidden table on the form contaning data for all the combinations. Depending on the selection of another 3 fields you can write the code to select only those values from this hidden table which are applicable to that selection. These values you can add to the drop down list removing the previous values.
    Only you have to do is on calculate or vlaidate event of target DDL you have to write your code.
    Pseudocode:
    1. Clear your DDL using deleteItem() method.
    2. Loop at your hidden table.
    3. Inside the loop check for applicable entries depending on selection in other 3 fields.
    4. Select the appropriate vlaues
    5. Add using additem method().
    Refer formCalc or JavaScript help for the appropriate code.
    Hope this will be helpfull.
    Regards,
    Vaibhav

  • How to make Multi Select Picklist Field Required Based on another field

    Hi,
    I want to make one filed which is Multi select Required(mandatory) based on certain value in another filed.
    I tried putting IIf([<FieldNAme>]> 1000 AND [<FiledNAme1>] IS NULL,"Invalid",[<FieldNAme>]) in the Field validatation as but it is not working.
    Please suggest any workaround available.
    Warm Regards
    Pramod
    Edited by: user11361975 on Jun 3, 2011 5:03 AM

    I guess FieldName1 is the multiselect picklist you are referring to?
    Where did you get the ITAG from? I don't see any multiselect picklists available in Expression Builder. I doubt whether you can set validations on multi select picklists at all.
    If anyone has achieved this please let me know as well.
    Regards,
    Udaya

  • How to find field name based on screen field name

    Hi all,
    I need to find field name at run time based on screen field name for doing some check.
    Eg, if i have P_CUST on screeen which refers to KUNNR . Then i should be able to find KUNNR based on screen name ie P_CUST during run time.
    Thanks in advance.
    Thanks and Regards,
    Taranam

    Hi
    ex:
    PARAMETERS :
      p_carrid LIKE spfli-carrid,
      p_connid LIKE spfli-connid.
    DATA:
      T_DYNPRO TYPE
      STANDARD TABLE
            OF DYNPREAD
          WITH HEADER LINE,
      W_PROG LIKE D020S-PROG,
      W_DYNP LIKE D020S-DNUM.
    CLEAR: FIELD_VALUE, T_DYNPRO.
      FIELD_VALUE-FIELDNAME = 'P_CARRID'.
      APPEND FIELD_VALUE TO T_DYNPRO.
    w_prog = sy-repid.
    w_dynp = sy-dynnr.
    ***TO READ VALUES on screen
    CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME                   = W_PROG
                DYNUMB                   = W_DYNP
                TRANSLATE_TO_UPPER       = 'X'
           TABLES
                DYNPFIELDS               =  T_DYNPRO.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • How to display F4 values in one field based on other field selection

    Hi All,
    How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
    Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
    2.Can i know how to display  the entries in supplier field based on Product category selection.
    Right now all the entries are getting displayed in the supplier field.
    I want to display only entries based on Product category.
    Search Help Name : BBP_BUPA_CLL_PARTNER
    Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
    How to enhance the web dynpro component with the filtered values.
    Regards,
    Krish.

    Hi Ashvin,
                 Thanks for the document. In the search help there is a standard FM which is getting executed.
    Can i enhance that FM or should i copy and edit.
    BBP_F4IF_SHLP_EXIT_CLL_PARTNER
    If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
    If not then suggest me some alternative.
    Regards,
    Krish

  • How to default the KFF segment values based on other field's value

    Hi,
    I would need to reset the 5th segment value of "Liability Account" field on R12 Supplier Page under "Accounting" link.
    Condition: And it has to be based on some other value like "GLOBAL CONTEXT VALUE and TaxPayer ID Type" under "Organization" link.
    Right now; as per the seeded page it defaults the Liability Account to "BL-130-0000-2110-0000-0000" under accounting link; I need to change this default value to "BL-130-0000-2110-2641-0000" based on above condition.
    I have tried using the below code:
    OAKeyFlexBean oakeyflexbean = (OAKeyFlexBean)oawebbean.findIndexedChildRecursive("LiabilityFlex");
    oakeyflexbean.setText()
    But this one does not work.
    Can anyone suggest me some option to acheive this requirement.
    Thanks
    Edited by: 880860 on May 21, 2012 2:23 PM

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Make a field mandatory based on a segment in distribution account

    Hi there,
    I have a requirement to make a flexfield segment mandatory to enter extra information when the user selects a particular account when entering the distribution lines of a Purchase Order. Only when segment 2 lies within a particular range of values, should this field become mandatory.
    Has anyone done anything similar before? Please let me know how to get about it.
    Thnx in advance :)
    Ash.

    Hi,
    You can do this by creating Context Sensitive DFF.
    While defining a Context in the DFF, put :<BLOCK_NAME>.<FIELD_NAME> in the Reference field.
    FIELD_NAME should be the field, on the basis of which you want the DFF to be mandatory. Check "Synchronize with Reference Field" check boc in the DFF window.
    The Contexts need to be defined exactly with the same name as the values, which might come in the refernce field.
    Gajendra

  • Can we sort one field based on other field in messsage mapping !!

    Hi Folks,
    I have got source xml with couple of Vendors, Vendors has got promotions on different products with different dates. If I sort date field, product quantity is not sorting. How Can I sort both fields at the same time, if I sort Promotion date field in ascending order, the product quanitity has to sort respectively?
    Any one can help in this please , any links are examples etc..
    Kind Regards
    Thanks in advance.
    San

    Hi Folks,
    I have tried with this function SortbyKey, it always throuing exception. That's the reason I came to you guys. Please have a look following mapping
    ZY2K_DATE    ----> Remove Context -->
                                           Sortbykey  -----> Condition etc.,
    ZA02_QTY   -----> Remove Context -->
    if I try to see display queue on Sortbykey  I am getting ' Exception'
    Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Queues have different lengths in function sortByKey] in class com.sap.aii.mappingtool.flib7.NodeFunctions method sortByKey[[Ljava.lang.String;@5be18f1d, [Ljava.lang.String;@357ae80b, SortComparator.CASE_SENSITIVE, SortOrder.ASCENDING, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@1818459b,
    Source
    <ROOT>
    ...<OUTPUT>          - - - -       0..unbound
    .......<Group_LIN>    - - -        0..unbound
    ..........<Group_ZA>  - - -       0..unbound      
    ..............<D02_ZA>  - - -        0..unbound
    ..................<ZA01>QD</ZA01>
    ..................<ZA02>35.0</ZA02>
    ..................<ZA03>CT</ZA03>
    ..................<Z_Y2K_DATE>20100723</Z_Y2K_DATE>
    ..............</D02_ZA>
    ...........</Group_ZA>
    ........</Group_Lin>
    ....</OUTPUT>
    Target
    ProductDemandInfluencingEventNotification  0..unbound
    ...ProductDemandInfluencingEvent                 1..1
    .......Item                                                           1..unbound
    ..........OrderForecastTimeSeries                     0..1
    ..............Item                                                    1..unbound
    .................ValidityPeriod                                  1..1
    ......................StartDateTime                             0..1
    ......................EndDateTime                               0..1
    .................Quantity                                           1..1
    the above D02_ZA tag sometimes comes more than one QD with different dates. Same dates has to go under one tag with respective quantities!! This is the situation, can any solve this please?
    The target tag "ProductDemandInfluencingEventNotification" will generate based on number of promotions on particular date. Ex: if one vendor has 'n' number products promotions on 3 different dates, 3 "ProductDemandinfluenceevennotifications" has to generate, that three promotion dates and quantities has to respectively.
    That ZA02 (Qty) value has to go Quantity target field.
    Kind Regards
    San

  • Maybe you are looking for

    • Can't drop database table objects on a EJB Diagram.

      JDeveloper 10.1.3 EA. When I drop a database table object on a EJB Diagram the error below occurs. Also dropping components from the Component Palette doesn't work. A wizard opens, but after completing that, nothing is on the EJB Diagram. However, af

    • Data source in EP7

      Hi all gurus! We are trying to use Solution Manager as data source for logon in our EP7 but we can't get the settings right. We have used an existing installation as a "template" but it doesn't work and it might be because the other portal is of vers

    • Assignment Field is blank in the Accounting Document of MIRO

      Hi Gurus I am working on ECC 6 version. I have observed in my system that for some of the vendor invoices posted using the MIRO transaction, assignment field is blank in the respective Accounting Document for the Vendor Line Item. But for GRIR Line I

    • TS1363 My iPhone won't turn on and appears in iTunes but not windows

      iPhone just displays apple logo, won't switch on.  Yes I've tried ressetting and yes, it is fully charged. When I plug into my pc, it shows in iTunes but won't sync etc. And you know when USB devices appear by the clock of pc, there is nothing there

    • Field selection on document type level in ME21n

      Hi All, from where i can make field mandatory in ME21N at document level. like i want to make an field mandatory for document type UB. regards, qsm sap