Setting a field as Mandatory dynamically based on certain condition

Hi All -
I am working on ADOBE Interactive forms. I am not able to find out, How to set a particular field as a 'Mandatory field' based on some condition. I am using FormCalc as scripting language.
i.e: I have a field "RATING". I want to make the next field "COMMENT" as mandatory when "RATING" is less than 3.

Hi Vishal,
   You need to set the mandatory attribute of the specific field according to your condition. In FormCalc this will be similar to this,
if (Rating < 3) then
          $.mandatory = "error"
          $.mandatoryMessage = "The corresponding Comment field is mandatory. Please fill"
else
          $.mandatory = "disabled"
endif
The mandatory property can be set as:
"error" : Makes the field compulsory to be filled before submission
"disabled" : Makes the field optional
"warning" : Gives a warning to the user that the field should be filled, but doesn't cause an error on submission
The property "mandatoryMessage" specifies the message to be displayed to the user when the mandatory field isn't filled before submission.
Regards,
Rose

Similar Messages

  • Adding few fields to the ODS based on a condition

    Need suggestions in adding few fields to the ODS based on a condition.
    The following is the requirement.
    Do a calday and 'Sales Org' based selection:
    0CALDAY=20041101-99991231; All Sales Orgs except AM01
    0CALDAY=20030701-20070930; All Sales Orgs except AM01

    Hi Dolly,
                   You can do this by writing a simple end routine in your transformation rules.It is just an  conditional statement.
    In that statement write
    If <RESULT_FIELDS>CALDAY EQ 20041101-99991231 and If <RESULT_FIELDS>Sales Org NE AM01
    <write the statements which populate the fields>
    endif.
    In the same way you can write the code.
    Hope this helps
    Regards
    Karthik

  • VT02N - do PGI and Invoice for certain deliveries either based on certain conditions

    Hi Friends ,
    We are using VT04 for creating shipments . While shipment completion stage in VT02N   an activity profile has been maintained  which does both the Goods issue and Invoice.
    We have a business requirement , PGI and Invoice should be created only for specific set of deliveries based on certain conditions.
    Is there any standard way to do this or by using user exits.
    Please guide.
    Thanks,
    Nileshsa.

    what about adding a check in userexit RV60AFZZ, when the condition is not met during invoice creation, error out and disable the creation of the invoice document?

  • How to Override Cost Center in IT 1 based on certain conditions

    Hi,
    I have a pretty good understanding on how Cost Center gets defaulted based on Org Structure.  The standard SAP solution for Cost Center will not work for my client and I need to determine the cost center based on certain conditions. I understand that I have to write custom code in some user exit or badi. I tried user exit EXIT_SAPFP50M_001, but it did not work.
    Here is my code:
    DATA: I0001 LIKE P0001.
    CASE INNNN-INFTY.
        WHEN '0001'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING
              PRELP = INNNN
            IMPORTING
              PNNNN = I0001.
    This is just an example to test the concept
    I0001-kostl = 'COST_CENTER'.
         CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
            EXPORTING
              pnnnn = i0001
            IMPORTING
              prelp = innnn.
    endcase.
    When I change IT 1 record and hit enter, I can see that my code is being executed. I can see cost center being updated on the screen, but when I save it, its not able to retain that new cost center value. This might be because cost center is not an open field.
    How can I change my code so it retains its value after saving?.
    Thanks!

    Contd to manoj
    Cost Center will be a Open feild when the value of   the  switch PLOGI ORGA  should be balnk if it is haveing 1 than it will not default the value kindly check

  • OIM 11g R2 - Setting a field as mandatory while provisioning through catalo

    Hi,
    May I know how i can make a field as mandatory (Red Asterick) while trying to provision an account through catalog wizard.I dont see any option to set required=true while creating a form for an application instance.Thanks.

    login to sysadmin-> create sandbox-> go to form designer->select your form now click on customize link(right top corner)->select your attribute and set the required field as true and then save it. finally export sandbox. run catalog sync job. and then verify if attribute is mandatory in the request form/dataset or not.
    same mentioned in R2 release note

  • How to set a field as mandatory when another field contains specific values

    Hi SAP Experts,
    Is it possible to set the Plant Specific Material Status field as mandatory when the DChain-spec. status field contains a specific set of values? Thanks.
    Regards,
    Kim Yong

    Hi Kim,
        I think you can achieve this using the validation tab in the field.Add a new rule for validation select the condition as test and in the value you have use formula according to your senario.Select the 'Stop execution'.This will make the field mandatory.
    I hope this helps...
    Naga

  • OIM11gR2 show items in catalog based on certain condition

    Hi All,
    Is there a way to show the catalog items based on some condition?
    Eg: Users having only "Role A" can see some entitlements or other roles.
    Any pointers are appreciated.
    Thanks
    Vicky

    You can take guidance from this: http://www.ateam-oracle.com/oim-11g-r2-ui-customization-tips-and-tricks/
    -Bikash

  • How to set the fields invisible/visible dynamically with screen-exits

    <b>Goal:</b> I am changing the subscreen from standard screen for mobile device interface, i.e. function group LMOB. With a scanner I am to read a material number and have it confirmed by the SAP system. For this I need an input field which is already supplied by the standard program. The users require the screen to be dynamic, i.e. I can not do the settings in the screen-painter.
    <b>Problem occurred:</b> After I have changed to use the customized subscreen 1202 in function group XLRF, not all the fields are displayed. It seems that the values for setting the screen elements are lost when calling the subscreen (3202, copy of screen 2202). For instance, it does not show my input field. Somewhere there need to be a list that contains all these parameter switches? I know how “Loop at screen” works but can’t find the values that are supposed to be passed over to the subscreen.
    Would be grateful for some help.

    Hi Niklas!
    Unfortunately I don't know the transaction you're working on, but I had a similar problem once.
    You have to use the commands <b>LOOP AT SCREEN</b> and <b>MODIFY SCREEN</b>. I found some online help here: <a href="http://help.sap.com/saphelp_470/helpdata/en/9f/dba70535c111d1829f0000e829fbfe/frameset.htm">SAP Online Help</a>. The fields of the pseudo-table <b>SCREEN</b> can be found here: <a href="http://help.sap.com/saphelp_470/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/frameset.htm">SAP Online Help</a>. I think you have to set <b>INVISIBLE</b> to 'X' - but you may have to experiment.
    Another thing to look out for is that you have to call this method in the <b>PBO</b> section of the dynpro. Take care no SAP logic is executed after your modification that changes your settings...
    Hope this helps (please reward me if it does),
    Joerg

  • How to dynamically Set the list of flex contexts based on a condition

    Database is in 11i atg rup7 level
    first OAF page - shows list of employees under a manager
    on clicking an employee record, the second OAF page opens and it shows a set of records from descriptive flexfield. Currently 5 contexts of the same flexfield are enabled for this responsibiltiy using the ContextA||Seg1|Seg2|Seg3||ContextB||Seg1|Seg2||ContextC||Seg1|Seg2|Seg3|Seg4||ContextD||Seg1|Seg|Seg3|Seg4||COntextE||Seg1|Seg2 in the personalisation at responsibility
    So 5 sections(one for each context) are shown in the OA page
    My requirement is to show only 3 contexts for employee 'A' and 5 contexts for the employee 'B'. Both the employees are under the same manager.So i think i cannot do a simple personalisation at responsibility level.
    So assuming ,i have some parameter like person_id , how do i dynamically restrict to 3 or 5 contexts in my controller code?

    Hi,
    Use this :
    OADescriptiveFlexBean descFlexfieldsBean = (OADescriptiveFlexBean)oawebbean.findIndexedChildRecursive("flexitemid");
    descFlexfieldsBean.processFlex(oapagecontext);
    if(descFlexfieldsBean != null)
    descFlexfieldsBean.setFlexContextCode(pageContext,"ContextName");
    Thanks,
    Gaurav

  • Hide field of the dynamic line for some conditions

    Hello,
    I have a dynamic table filled like that :
    material  |   qty    |   unit    |    button  
    123455   |    489      |    PC    |     
    987654   |    376      |    PC    |     
    765432   |    534      |    PC    |     
    On the last column I have a button. When I click on it, I would like to show 2 more fields but only for the line where I clicked the field.
    material  |   qty    |   unit    |    button  
    123455   |    489      |    PC    |     
    987654   |    376      |    PC    |__X__        |      here        |       here        |
    765432   |    534      |    PC    |
    I think that I can define my table with 6 columns, hide the header of the last 2 ones, but I can't find any instruction to hide and make visible only fields of the line.
    Could you help me ?
    thanks

    I wrote this in the click method but I get an error :
    var cnt = data.form.TABLE.line.instanceManager.count;
    cnt = cnt;  //zero-based index
    for ( var i = 0; i < cnt; i++) {
    if ( i == this.parent.index )
    if ( data.form.TABLE.line.BUTTON == "X" )
    data.form.TABLE.line(i).new_field = "visible" ;
    else{
    data.form.TABLE.line(i).new_field = "invisible"

  • To make a field hide and show based on a condition.........

    hi all.
    i have a requirement where i need to make a set of regions alter based on which field we select....
    i have a LOV input and based on that the input the respective region has to be displayed..
    suppose i have 5 regions.....
    if i give 1 then the 1st region has to displyed.....similarly 2nd and 3rd......
    any help..........????????
    DEV

    Hi,
    Check the code snippet from Dev Guide:
    if (pageContext.isLovEvent())
    // Form was submitted because the user selected
    // a value from the LOV modal window,
    // or because the user tabbed out of the LOV input.
    // Find out which LOV input triggered the event.
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    // Find out the result values of the LOV.
    Hashtable lovResults =
    pageContext.getLovResultsFromSession(lovInputSourceId);
    if (lovResults != null)
    // Update the page depending on the value chosen by the user.
    It explains what you need.
    niranj

  • How to change the insert allowed false dynamically based on some condition

    Hi,
    I have two data blcoks B1 and B2.
    B1 is heade and B2 is detail.
    B1 contain one filed PO number based on that user press the button.
    Based on PO we get the some fileds in B2 from cursor.
    In B2 filed contain total 5 fields. 4 fields come from cursor button. remaining one field user will enter.
    My requirement is afte the getting the records from cursor. I need to not allowed to create new records.
    Please do the needful.

    902434 wrote:
    Hi,
    I have two data blcoks B1 and B2.
    B1 is heade and B2 is detail.
    B1 contain one filed PO number based on that user press the button.
    Based on PO we get the some fileds in B2 from cursor.
    In B2 filed contain total 5 fields. 4 fields come from cursor button. remaining one field user will enter.
    My requirement is afte the getting the records from cursor. I need to not allowed to create new records.
    Please do the needful.As per i understand you want on block b2 insert allowed false.
    Try this
    If your_condition then
         SET_BLOCK_PROPERTY('block_name', INSERT_ALLOWED, PROPERTY_FALSE);
    else
         SET_BLOCK_PROPERTY('block_name', INSERT_ALLOWED, PROPERTY_TRUE);
    end if;Hopes this helps..

  • Set Cell or Row to read only if certain condition is met

    Greetings,
    As the subject suggest, I need to set Cells or Rows to Read Only or "Gray out" If Certain attribute doesnt contain any value.
    The requirement is to search for records of certain range and display it in the table. And the records will not be editable (read only) if certain attribute/field of the record is NULL. In another words that particular row will be gray-ed out.
    Right now I am able to extract out the range of records out and display it in the table but I am not able to set the display of the records/ rows to read only. Do note only certain row needs to be set to row only depending on a particular attribute.
    I was to code these in WDDOMODIFYVIEW()... anyone have any solution to this? Points will be given of course. ")

    Please dont use the DOMODIFY method for such changes.
    The Properties mapped to the context are designed for exactly this purpose.
    Your context node should be extended with another attribute. Eg attr_y_Read_only.
    The read_only or enabled attribute of field y would then be mapped to this attribute.
    Depending on cell editor type it may be called enabled or read only.
    You then set this new attribute to true or false appropriately for each element in the node.
    This new attribute, although inside the node, need not be displayed as part of the table.
    It is there to help control fields in the each element.
    Regards
    Phil.

  • How to enable or disable report parameter based on certain conditions

    Hello ALl,
    I have 3 parameters in my report. Fst parameter is having a LOV which is having all status value like 'Received,Refunded, Exempted etc).
    second parameter is From date and third parameter is To Date which is having value set as "FND_STANDARD_DATE'
    Now my requirement is If Status is selected as "Exempted" then From and To Date should be disabled.
    if other than that then both should be enabled.....
    Please help me out.
    How it cna be done.
    Thanks in advance
    sheetal

    Hi,
    You can use a condition
    <?xdoxslt:ifelse(Condition,'Paragraph','')?>
    Condition is the condition that needs to be satisfied
    Paragraph is the paragraph that needs to be displayed if the condition is satisfied
    '' is what needs to get displayed if the condition is not satisfied.
    Thanks,
    Swarna

  • Generate Absence Quota based on certain condition

    Hi Experts,
    I'm new in Time Management. I have requirement in generation quota where new employee would have their quota after december in hiring year.
    For example
    A join in 01/06/2010. In 01.01.2011 we generate absence quota and A would have 6 days in year 2011, and normal 12 days in year 2012 and 12 days in the following years.
    B Join in 01/11/2010. In 01.01.2011 we generate absence quota and B would have 2 days in year 2011 and normal 12 days in year 2012 and 12 days in the following years.
    in other word the employee must earn the absence quota first and use it in the following years.
    Can this be achieved without using PCR because i dont have any experience in PCR? Many Thanks
    Regards

    Hi,
    Thanks for the table, I've found temporary solution with this setting:
    Validity/Deduction Interval
    Deduction from End of validity Interval   - 1 days
    Deduction to end of validity interval  + 12 months
    Enter previous year period for generating quota this year.
    Best REgards
    Edited by: Hendri Salim on Nov 5, 2010 1:58 PM

Maybe you are looking for

  • Why do I need to start up Screen Sharing twice to get it to work ?

    I have an Intel Mac Mini connected to my TV, so I started using Screen Sharing from my MacBook Pro to be able to work on it when others were watching TV. Both Macs used to have OSX 10.5 Leopard, and everything worked fine. Now they both have OSX 10.6

  • Checks getting Void

    Hi, I use Fb60 to post the invoice then run F110 and print the checks. there are 2 check number gettting generated ( 2 pages in print preview) and the check are getting Void ITs a fresh check - i dont want to get it Void.

  • How to identify line and paragraph breaks on word enumeration

    Hi, I am using PDWordFinder to extract text from the PDF document and then enumerate each word. I need to identify the line breaks and replace them with white space and paragraph breaks should be replaced with "/r". I use the following to identify th

  • Why does Iphone sync the photo library folder when it is not checked in itunes.

    Hi, I have any iPhone 4 running 4.3.3. iOS. I recently synced photos in iphoto 6 and selected the folders i wanted I wanted to sync in iTunes.  after the sync, the folders that i wanted to sync are there, but also the photo library folder is there. 

  • How to trigger Web Service created by WebMethods

    Hello Experts, In our project WebMethods is using as middleware. We need to pass some XML files from SAP to some third party system using WebMethods (ESB). So, here WebMethods is creating a Web Service and from SAP we need to trigger the WebService a