Make a mandatory or optional field according to the value in the other field

Hello

I added a new location of the merchant class just under the name of merchant in the fresh details in iexpense page. I want to make this field option or required depending on the value selected in the field Type of expense.

If Type of expense is like mileage so merchant should be mandatory otherwise in option.

I found controller associated with this page is DetailsPageGlueCO and here is the code that I am trying to extend DetailsPageGlueCO.

package oracle.apps.ap.oie.entry.lines.webui;
Import oracle.apps.ap.oie.entry.lines.webui.DetailsPageGlueCO;
Oracle.apps.fnd.framework.webui import. *;
Import oracle.apps.fnd.framework.webui.beans.OAWebBean;
Import oracle.apps.fnd.framework.OAException;

SerializableAttribute public class XXDetailsPageGlueCO extends DetailsPageGlueCO
{
' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{

super.processFormRequest (pageContext, webBean);

Try
{
String ExpReportType = pageContext.getParameter ("ExpTypeChoice"); take the value of the list of ExpTypeChoice

If (ExpReportType.toLowerCase () .indexOf ("mileage")! =-1) / / check if the value selected in the list ExpTypeChoice is of type mileage
{
Code to intercept the value in ExpTypeChoice list, and then newly added fact XXMerchantLocation required field?



}
} catch (System.Exception e)
{
throw new OAException ("you must enter merchant location");
}
}
}

Pls. suggest a piece of code in the section / / Code to intercept the value in ExpTypeChoice list, and then fact newly added XXMerchantLocation required field?

Published by: yannick bigot on January 2, 2012 06:42

Bigot,

To make a required field on the selection, you must join a SPEL with the bean and make true or false based on your requirement.

See article PPR of the developer's Guide.

Kind regards
GYAN
www.gyanoracleapps.blogspot.com

Tags: Oracle Applications

Similar Questions

  • Same App but .cod size varies according to the other version of the OS?

    Hi all

    I have an application when Im trying to build in 5.0 the size shown me cod 71 KB
    App even when Im trying to build 6.0 size shown me cod 71 KB
    But the size 7.0 disclosed only 35 KB

    Why such different files sizes of cod occur for a single application.

    with this .cod file minimum IE 35 KB file works fine in all simulators, it will get any problem if I deploy different versions in the device?

    OS 7.0 update of applications may work but are not supported on previous levels of the operating system.  If you want to run with the smaller version, it's on your own head.

    Take a look at the related to its application jar file, compare the jar compiled OS 5.0 with the pot compiled OS 7.0 to see what makes the difference.

  • Make a mandatory field if the selection is made in the drop-down list

    Hello

    Does anyone know how to make a field optional mandatory change based on a selection made in a drop down list?

    For example, I have a combo that has option 1-3, and I have a hidden field that is optional. When option 3 is chosen the hidden field is visible, but I also want to be required before a the form submission is possible.

    Thanks in advance for any idea!

    You can place this code in your event out of you in the drop-down list... Just change TextField1 your domain name and make sure that the language is set to JavaScript:

    If (this.selectedIndex == 2) {}

    TextField1.presence = "visible";

    TextField1.mandatory = "error";

    TextField1.mandatoryMessage = ' this field is required ".

    }

    else {}

    TextField1.presence = 'hidden ';

    TextField1.mandatory = "disabled";

    }

  • Make a field of text/hide according to the results of a drop-down list box

    Hello

    I wonder if someone could help me with this. I want to show/hide some text boxes in my form according to the choice made by the person filling in. For example, there is a dropdown list containing a selection of numbers 1-4. If 1 was selected, the text boxes below 1 would be visible and obligatory, if the 2 have been chosen, 2 text boxes below would be visible and required etc...

    I'm new to FormCalc (only started using it this morning), so simple a possible explanation would be fantastic.

    Thanks for reading!

    Of course, you can have javascript and formcalc in the form. Not only the two in the same field, same event; D

    Okey, let's try some things:

    (1) check if the "binding" from the drop-down list is the same as the values that you choose. In the script you are referring to the bound values.

    (2) other names for the Textfields would be better, because it is more difficult to refer to "Textfield1 [1]" then to for example: 'New '. I was just to lazy to give them names. (If it's on another page or subform, you refer to the fields correctly: as MyForm.FirstSubform.FirstTextfield... this name lies in the specific script field.)

    (3) check your script once more... want to make invisible mandatory fields?

    (4) check if your form is dynamic. (If it isn't you will not see the changes...)

    You should probably do it in small steps, such as:

    (1) first of all, you refer to areas such as:

    This.rawValue = Firstfield.rawValue;

    If the changed value fields got you its name and to be sure that the event you put is the right one.

    (2) try the different parts of the script and look at how it works. Problems can be more easily found and then

  • Creation of optional field in sitestudio.

    I am trying to create a definition of the region using sitestudio. I successfully added two elements in the definition of the region. I couldn't find a property to make them compulsory or optional. My need is to make others mandatory and an optional.

    When I'm helping both become mandatory and I have do not provide value to them. Is there a way to make an optional element.


    Thank you
    Sanjeev

    I think that you define if the field is required or not at the level of the element definition. For example, if you want an optional and the other required, you must use two different element definitions.

    Jonathan
    http://jonathanhult.com

  • Diagram of the Avro - optional fields - not give 'in the Union"exception

    Hi all

    I have a problem with the help of the optional fields in a schema by using the JSONAvroBinding and avro.

    If I have a scheme of the user who has a first name field. The user may choose to provide the name or not. The field is optional from the perspective of readers.

    (this comes from http://docs.oracle.com/cd/NOSQL/html/GettingStartedGuide/avroschemas.html who is nosql avro documentation)

    {

    "type': 'record."

    "namespace": "com.example."

    'name': 'Full name',

    'fields':]

    {'name': 'first', 'type': ['string', 'null']},

    {'name': 'last', 'type': "string", "default": "Smith"}

    ]

    }

    Here, if I provide this example as Avro scheme, then omit the name when I write, it will work without problem. But when I try to write 'John' it will fail with:

    Caused by: org.apache.avro.UnresolvedUnionException: not in the union ['string', 'null']: 'John '.

    to oracle.kv.impl.api.avro.JsonBinding$ JsonData.resolveUnion (JsonBinding.java:403)

    at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:144)

    to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.write (JsonBinding.java:599)

    to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.writeRecord (JsonBinding.java:695)

    to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.write (JsonBinding.java:565)

    Truncated. check the log file full stacktrace

    It does not work:

    {

    'first': 'John ',.

    "last": "Smith".

    }

    It works:

    {

    "last": "Smith".

    }

    It seems that someone else has had this problem and posted on the Avro site, where a response said that it might be NoSQLs due to lack of libraries:

    "The error is thrown from the Oracle NoSQL Avro library use and is not clearly a problem of Avro. You might be better off trying to get help for this Oracle? »

    https://issues.Apache.org/jira/browse/Avro-1376

    Any thoughts? To me, this seems to be a bug in the JsonBinding class?

    According to this:

    http://www.Oracle.com/technetwork/database/nosqldb/learnmore/nosqldb-FAQ-518364.html#HowtouseAvrounionstoencodeoptionalfields

    Sending

    {

    'first': 'John ',.

    "last": "Smith".

    }

    is not correct.

    Instead, sending:

    {

    'first': {}

    'chain': 'John '.

    },

    "last": "Smith".

    }

    works.

  • Make a mandatory item based on another article

    Hi all

    I'm having a problem while doing a required field in a table. I use following code when validating trigger:

    If: XXONT_ABC.ORG IS NOT NULL THEN
    set_item_property('XXONT_ABC.) WASHING "(, EXIGE, PROPERTY_TRUE);"
    end if;

    This code makes the other XXONT_ABC field. WASH required but when I move down to 2nd row, yet it is mandatory for 2nd place while I'm not entered any value in XXONT_ABC.ORG.

    Please suggest.

    Thank you.

    Published by: Amit1cs on May 16, 2013 15:22

    Hello

    did you try with set_item_instance_property. Try this.

    Concerning
    Sri

  • How to remove the action of fire at the field of the image according to the State

    Hello
    I have an Image field and have a test of fireaction of the table and all other fields are Mesagestyled text

    Requirement is need to remove fire action action certain lines according to the State.

    Pls help... how to proceed?

    Thanks in advance,
    Roxanne...

    Roxanne,

    You need to make use of region selector for the realization of your condition. See the Developer Guide for more information on the region of Switcher.

    Kind regards
    GYAN

  • Adobe is creating - JavaScript - read-only / gray fields according to the user's response

    I hope someone here can help me!

    I need to create an Adobe form where the answer to the first question greys out and makes some fields read-only.

    I am aware that I need to write a Java Script for that, but how do I do this? I did research for the days, and I can't function.

    Here is the example:

    The question is "is - this project fall under standard terms? ' and if the answer is Yes - so many questions should be ignored, as if the answer is no, the questions must be answered.

    I tried to have the first question as a checkbox, radio button and a drop-down with the 'yes' and 'no' option, but none of this seems to help.

    Can someone help me understand what I need to do? PLEASE, I BEG YOU!

    Thank you

    It is quite simple and can be made much simpler if give you all the names of optional field of a common prefix using a hierarchical naming scheme. For example, if you use a prefix of 'optional' so that you have domain names like "optional.name", "optional.address", "optional.email", etc. (note that the period character is critical here), you can set fields in the group to read-only with a single statement. Similarly, you can set the background color or reset the group, which is a good idea when the fields turn off/on. For example:

    var f_prefix = "optional";
    
    // Get a reference to all of the "optional" fields
    var f = getField(f_prefix);
    
    // Set them all to readonly
    f.readonly = true;
    
    // Set the background color to gray
    f.fillColor = color.gray;
    
    // Reset all of the fields
    resetForm([f_prefix]);
    

    You can place this type of code in the mouse event to the top of a box, something like:

    // Mouse Up script for check box
    // If checked, certain fields should be disabled
    
    var f_prefix = "optional";
    
    // Get a reference to all of the "optional" fields
    var f = getField(f_prefix);
    
    // Reset the optional fields
    resetForm([f_prefix]);
    
    if (event.target.value === "Off") {
        // Enable the optional fields
        f.readonly = false;
        f.fillColor = color.white;
    } else {
        // Disable the optional fields
        f.readonly = true;
        f.fillColor = color.gray;
    }
    
  • I tried to make a donation of $20, but will not accept your use of my personal details according to the rules of confidentiality year so my 20 bucks always in my pocket... what to do?

    tried to make a donation of $20, but will not accept your use of my personal details according to the rules of confidentiality year so my 20 bucks always in my pocket... what to do?

    Hello onjay, what is the part that bothers you? There are also several other ways to donate to mozilla than to go through the donation form: https://wiki.mozilla.org/Ways_to_Give

    and of course there are also non-financial ways you can contribute to mozilla:
    https://www.Mozilla.org/contribute/

  • What is the meaning of Option field in the tool 'Toshiba button Support?

    I used Toshiba button successfully Support to change the usage of my Eco mode button.
    There are 4 fields: Description, field target and button Option.

    I have already searched the web but can't find any answers.
    What does the input field 'option '?

    Hmm that's the right question
    I think that this field allows an option button (or maybe a shortcut in option) that would start the tool placed in the field target.
    But that's just a hypothesis test that simply and thanks for posting a comment... I'm interesting as well...

  • have place the sim card into the computer according to the instructions, but can't make it work

    Original title: sim set up

    I have acquired a dell inspiron duo and have place the sim card in the back according to the instructions, but can't make it work

    Hello

    You can buy a WWAN card to use a SIM card. You should also call your mobile service provider and check with them.

    Similar question has already spoken here: http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/how-to-make-the-sim-card-work-in-studio-15-dell/4507610a-e4aa-4bfd-9e94-ed71a60ad550

  • Treatment options for form (use the value of a form field to select a shared list or a web redirect page)

    Hello

    I tried something with the processing of the forms which doesn't seem to work. I wonder if the function really works or if I'm doing something wrong.

    Here is an example of what I do: I have a form that I want to use. I add "Web Page redirection" processing step to my form. When I click on the processing step to set up, under "General settings" there is an option that says "Choose how the launch of destination page is selected." In this drop-down menu, there are three options: always redirect to the same landing page, use a drop-down list to select the landing page and the value of a form field allows you to select the destination page. I have a hidden field on the form that contains the URL of the web page to which I would like to redirect. When I select 'Use the value of a form field to select the landing page', I select the hidden field to the field that contains the URL of the web page to which I want to redirect. It's my setup. However, when I submit the form, nothing happens, I do not redirect to the URL contained in the hidden field... This function still works? I'm doing something wrong? I can't seem to get the function "Use a drop-down list to select the destination page" to work either. The same thing happens when I try to use the "Add Contact to shared the list" processing step. I add the name of the list that is shared in the field hidden, but the contact does not appear in the shared list... These functions still work? If yes how do I configure them?

    Thank you!

    Well, I understood the problem of the shared list... You must add the ID of the list shared in the hidden field. I had to use Firebug to see the real ID of the shared list. Once you have the ID, use you it as a static value in the field. If the HTML code of the form will look something like this:

    If you do not use the lookup data ID. You use the ID real asset on the shared list. You must use something like Firebug to find.

    I'm glad everything is working.

  • How to configure Enterprise Manager Database Control (MCCD) to make it work on 2 servers (primary and standby) work according to the rules of the DG

    Hello everyone I use Oracle Database EE 11.2.0.4 with DG.

    In these cases, I need to get Enterprise Manager Database Control running against DB with no CARS and no DG I do the following:

    I have SQLPLUS logon as user SYS or SYSTEM and drop the account sysman and business objects:

    DECLARE

    CURSOR c1 IS

    SELECT master, synonym_name name

    OF dba_synonyms

    WHERE table_owner = "SYSMAN";

    BEGIN

    TO r1 c1 LOOP

    IF r1.owner = "PUBLIC" THEN

    RUN IMMEDIATELY "DROP PUBLIC SYNONYM ' |" R1. Name;

    ON THE OTHER

    RUN IMMEDIATELY "DROP SYNONYM ' |" R1. Owner: '. ' || R1. Name;

    END IF;

    END LOOP;

    END;

    /

    Mgmt_view DROP USER CASCADE;

    /

    DROP ROLE mgmt_user;

    /

    Sysman DROP USER CASCADE;

    /

    After that, I run

    EMCA - config dbcontrol db-rest recreate

    But what do I do in case I have 2 servers (primary and standby) work according to the rules of the DG?

    Hello

    It is not possible to monitor and administer a basic physical or logical standby, IE using Enterprise Manager Database Control Data Guard.  This is mainly due to the fact that Database Control is designed to monitor the 1-database and an environment Data Guard, by definition, includes more than 1 database.

    If you attempt to run emca against a database of pending, you will get an error like (i.e. ORA-01219: database is not open).

    Of course, database Control, can be used to monitor the current main database (with no capacity to administer or control Data Guard related features).  In such a case, failover Database Control needs to be reconfigured to run on the new primary database using the commands described in detail in Note 278100.1 how to remove, create and recreate DB Control In A Database, section c. recreate/ReConfig DB control, Option 2 10 g. recreate the control DB Configuration files and repository.

    Enterprise Manager Grid Control or Cloud control provides the functionality for display, monitor, and administer the primary and standby databases in a Data Guard configuration.

    Reference: It is Possible to configure the database for a logical or physical Standby Database command? (Doc ID 315116.1)

    You can effectively use EM 12 c cloud control to monitor and manager ensures DB

    Ref to the link for more details below

    Set up and manage to Oracle Data Guard with Oracle Enterprise Manager Cloud control 12 c

    Kind regards

    Rahul

  • I can't see my master pages in the pages Panel and according to the options in the Panel, they appear...

    Hello world

    I work in a large InDesign file that I just sent to our translator who has adapted in the file itself.
    I just saw that he made a mistake in the masterpages, but I can't seem to access my masterpages more. According to the Panel options, they must appear on the top in the pages Panel, but they are not...
    Does anyone have a solution?

    Thank you

    Anne

    I did an exploration of the possibilities, and I can't find a situation where access to the part of Master Pages from the Pages panel is completely lost. The separator between sections of pages, Master Pages and document is drag-able, but even by slide it upwards or downwards is not completely hide the masters... at least in my control panel.

    So, the strangeness you encounter is exactly the kind of strangeness that lightens in general with a reset of the preferences. This at least is the first thing you should try if you have not already.

    Troubleshooting 101: Replace or 'trash' to your InDesign preferences

Maybe you are looking for