How to make one field dependent on another

Hi All,
I have 2 fields say FieldA and FieldB which is dependent on FieldA.
The logic is If FieldA is NULL then FieldB should be NULL
If FieldA is not NULL then FieldB should be not NULL.
I have written the following code in the WHEN-VALIDATE-ITEM trigger of FieldA
if :BLOCK_NAME.FieldA is not null then
set_item_property('BLOCK_NAME.FieldB', REQUIRED, PROPERTY_TRUE);
end if;
This makes the FieldB mandatory (color changes to yellow) when I tab out of FieldA, but if I save the record without any value for FieldB, it gets saved without any errors.
Any help is appreciated.
EBS version 12.1.3 DB version 11.2.0.2 and Forms10g

sreedevi  wrote:
Hi All,
I have 2 fields say FieldA and FieldB which is dependent on FieldA.
The logic is If FieldA is NULL then FieldB should be NULL
If FieldA is not NULL then FieldB should be not NULL.
I have written the following code in the WHEN-VALIDATE-ITEM trigger of FieldA
if :BLOCK_NAME.FieldA is not null then
set_item_property('BLOCK_NAME.FieldB', REQUIRED, PROPERTY_TRUE);
end if;
This makes the FieldB mandatory (color changes to yellow) when I tab out of FieldA, but if I save the record without any value for FieldB, it gets saved without any errors.
Any help is appreciated.your code is ok for the setting required but if cursor didn't move to FieldB, it will not say anything.
You can try this...
change form property
Defer Required Enforcement=YesHope it will enforce form to enter FieldB.
Can do another thing, Create form level trigger Pre-Commit and write down code for checking value of FieldA and FieldB and raise form trigger failure.
Hope this helps

Similar Messages

  • How to make one map dependent on another ?

    Assume you have 2 maps - M1 and M2
    How to execute M2 automatically after successful run of M1 ?
    or if I have process flows PF2 start after success of PF1 without a manual intervention
    I looked at scheduling,.You can only set timing there but don't know how long your map runs.
    Thank You

    To make map dependant of another map you can use process flow. In process flow you can call M2 only if M1 is success. If M1 is failure you may exit the process flow.
    Am not sure how it will work for process flow. May be writing a 3rd process flow and call PF1 & PF2 within it based on success status? or write some PL-Sql wraper procedure for the same???!!! give it a try.

  • How do I make one window progress to another in swing

    Ive got to design a simple quizgame interface using Swing. Its got to have a player's front-end - gives a selection of questions where the user selects one of five answers, a scoring front-end - displayed after game that allows user to enter their name and a manager's front-end - used to enter questions. The thing is I only have to design the interface. I want to have a front window that leads to the managers front end, scoreboard, and game seperatley. I also want the system to report back when the players got the question wrong or right and then take them to a scoreboard. I dont know how to keep this all seperate from the normal code in the program being written by someone else. I also dont know how to make one window lead to another etc. Please can someone help. does anyone have some code I coulkd adapt for this purpose Im really stuck!!!

    Have a look at CardLayout. Rather than adding removing components, you can keep your three screens separate. Basically, you have three JPanels only one of which will be displayed at any one time. If one has textfields and you switch to another and then back, the text in the textfields will still be there.
    Here's some snippets from an application of mine:
    // set a 'container' panel to cardLayout. This will 'hold' the panels to be displayed at any one time
    private CardLayout cardDisplay;
    deck = new JPanel();
    cardDisplay = new CardLayout();
    deck.setLayout(cardDisplay);
    // add your various screens to the 'container' panel
    deck.add(logonPanel, "LogonPanel");
    deck.add(newUserPanel, "NewUserPanel");
    deck.add(bookingPanel, "BookingPanel");
    deck.add(printPanel, "PrintPanel");
    // add the 'container' panel to the contentPane
    c.add(deck, BorderLayout.CENTER);
    // switch the display, for example when a button is pressed, by using
    cardDisplay.show(deck, "NewUserPanel");
    cardDisplay.show(deck, "EnquiryPanel");

  • How to make a field un editable in one screen

    Dear Experts,
    I want to know how to make one field as un editable in one screen.I will explain in detail. I want to make "Reconciliation account" field as un editable in XD02 t-code.
    Regards,
    Surendra babu.

    Hi Surendra,
    Use this path in spro:
    Financial Accounting-> A/P&A/R-> CustomerAccounts->MasterData->Preparatons for CreatingCustomerMasterData
    use the transactions & u can update for creation of customer master or hange of customer master.
    Hope this helps you
    Award points if helpful
    chaitanya

  • Slide duration - How to make one slide have a different duration to another slide?

    Slide duration - How to make one slide have a different duration to another slide?
    EG So one slide has 2 seconds, another 4 another 6
    All I can see is how to make all slides have the same duration
    Any help very much appreciated!
    Brian

    Slide durations are not changeable on a slide-by-slide basis.

  • How to map one modbus register to another modbus register in labview?

    How to map one modbus register to another modbus register in labview? For example, let 40001 equal to 30001. Thank you.
    Steven

    Hello Steven,
    Sorry, I was under the impression that you were using the complete Lookout development software (as opposed to just the Lookout Protocol Drivers). You cannot do any development (connections, mapping, etc.) with the Lookout Protocol Drivers (LPD). So, you were right. We have to do this in LabVIEW.
    I ain't sure how exactly the Modicon floats work, but assuming what you're saying is correct, in your LabVIEW VI(s) you would read the DataSocket item corresponding to 40yyy+1 first, and then write this value back to the DataSocket item corresponding to 40xxx. Similarly, you would read the DataSocket item corresponding to 40yyy and then write the value read back to the DataSocket item corresponding to 40xxx+1.
    A tip: I wou
    ld at first make sure I have the OPC communication between LabVIEW and LPD working. Make sure you can read and write to the LPD registers via their DataSocket/OPC equivalents in LabVIEW. You can then implement the mapping as described above.
    Hope this helps,
    Khalid

  • How to make a portlet unvisible for another(not Owners) Users?

    Hi all,
    I (Site-Owner) have create a little Portal-Site with any portlets.
    I want to make one or two portlets(Admin-Area) unvisible for other users. But when I create a portlet as Site-Owner, then all another users can they see.
    How to make a portlet unvisible for another users?
    Regards
    Leonid Pavlov

    You can hide and show portlets of Web providers (OmniPortlet, Web Clipping, and Java portlets) on portal pages dynamically. This functionality is controlled by security managers. The PDK provides a number of security managers. For example:
    o Group security manager: The group security manager makes the portlet appear to users who are members of a specified group, while hides the portlet for those who are not members.
    o Authentication level security manager: You can use the authentication level security manager to control access to the portlets based on the user’s authentication level. For example you may hide the portlet from public users, but display it to authenticated users.
    In addition to the security managers provided by the PDK, you can build your own security managers.
    Although OmniPortlet and Web Clipping do not expose security managers through the user interface, you can apply them by editing their XML provider definition file.
    For PL/SQL portlets you can use the is_runnable method to control whether the portlet is hidden or shown.
    Peter

  • How to make some fields in ALV tree editable

    Hello All,
    Can any one tell me how to make some fields in ALV tree editable.
    If possible please post some code.
    Regards,
    Lisa.

    Hi Lisa,
    I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
    I tried making the wa_fieldcat-edit = 'X' But in vain.
    Also i made the layout fields  wa_layout-edit = 'X'  and wa_layout-edit_mode = 'X'.
    But still the alv tree field appears as display.
    As you have mentioned in the post as answered, So please guide me to make the field editable.
    I am using oops method.
    Please provide me code if any.
    Thanks & Regards,
    Mozila

  • How to make default Currency  depending upon plant in table entries

    Hi,,
    How to make default Currency  depending upon plant in table entries?
    I am making entries in SM30.
    I have the following fields in z table.
    plaant , material,month.year,PFvalue,Currency.
    Can  some body throw light for this issue,please?\
    I am familiar  with modification-events.
    With Regards,
    Jaheer

    Hi,
      In PBO, within a LOOP, table control is filled via a Structure/Work Area.
      In that module, code as follows,
    LOOP AT SCREEN.
        IF WA-FIELD1 = C_1 AND SCREEN-GROUP1 = C_G1.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
    ENDLOOP.
      Here, WA is a strcture & FIELD1 is its field, like that...
      I already did this.
      Check it out & Reply.
    Yours,
    R.Nagarajan
    We can

  • How to use one hash table inside another hash table

    Hi everyone,
    Any example of hash table inside another hash table.
    Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
    Thanks,
    kanty.

    Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
    Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
    Edited by: sabre150 on Jul 2, 2010 10:11 PM
    Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain.

  • How to make a field in adobe form noneditable

    how to make a field in adobe form noneditable. like info keys..
    when this form is sent through worflow the receiver shudnt be able make changes to the field value...(I have a form, which has fields prefilled(like pernr employee name) but these fields are in editable able..(i want only some fields to be uneditable not all)
    Edited by: kumar gaurav on Apr 11, 2008 8:04 AM

    Hi,
    You can make fields non-editable at runtime using this code:
    field.access = "readOnly"
    Hope this helps.
    Amit

  • How to make a field Mandatory in a Table view?

    How to make a field Mandatory in a Table view?
    The requirement is, the user should not be able to append a new Row, unless and untill he enteres the data in the column SOLD-TO. Now how do i acheive making this field madatory. Normally in Edit form view, we can go in customizing and flag Mandatory, for table view we don't have this option.
    Please can anyone of you guide me in this approach?
    Jagadish.G

    Hi Jagadish,
    have a look in this thread, part of the code you can use in eh_insert method or logic to write enable/disable insert button.
    Re: Assignment Block Mandatory
    regards
    Ismail
    Edited by: Ismail Shaik on Oct 21, 2009 11:36 AM

  • How to make a field mandatory in billing

    How to make a field mandatory in billing document,if m right with the help of incomplition log but how.....
         plz reply the full configuration.

    Hi Mohan,
    We normally create a billing document with reference any other document say Order or delivery.
    so, all the necessary information in the invoice will be taken from preceeding doucments. Thats way in the order level we check for incompletion log. If any important data is missing in the order level then the succeding documents will not be created.
    Thats way in the billing documents all the necessary information will come automatically either from preceeding documents or from master data.
    Still you want to make any field mandatory, you can do these by modifieing Billing documents user exists,you can make which ever the fields are mandatory and to be checked before saving. so when you are going to save the invoice, it will check if these fields are maintained or not.
    Hope this is clear.
    Reward if helpful.
    Thanks,
    Praveen

  • How to make a field required in OAFramework

    How to make a field required in OAFramework at runtime?? Please explain in detail if possible.
    Thanks
    Kumar

    Get the handle of the bean using the following Code
    <BeanType> bean = <BeanType>webBean.findIndexedChildRecursive("<Id of bean>");
    if(bean!=null && <condition>)
    bean.setRequired(true);
    }

  • HT5796 I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed

    I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed my problem.

    I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed my problem.

Maybe you are looking for

  • Error while deploying jar file in jboss

    Hi, I am trying to deploy a jar file in jboss, i have copied the jar in jboss_home/server/default/deploy/ directory. and i am getting the following errors while starting the jboss server. ERROR [MainDeployer] Could not create deployment: file:/C:/jbo

  • Purchase Req to Purchase Order

    Is there a transaction in SAP where a user can both release a purchase requisition AND create a purchase order from that same req without having to leave that transaction and go into another?

  • Nested Tables and Constraints??

    Hi all I have created objects like this create or replace type type_one as object (col_a number(3), col_b number(2), col_c varchar2(3 char)); create or replace type type_one_tb as table of type_one; create or replace type type_two as object (col_aa n

  • Purchase order Doc type

    Hi, While making PO,i want to make Account assignment category to be mandatory for a particular document type. How to do this? Regards

  • Substr function in CTL file of sqlloader

    Hi gurus, I am using sql loader to load the data from text file to oracle table. I have 2 columns in the input data, which are of more size than their corresponding destination table column sizes. I am using substr() function in the control file, but