PreDefault Value of a field depending of a Group OR an access profile

Hello,
I can't find how to set a PreDefaultValue depending of a group OR an access profile OR a role during the creation (new event) of a new record (i.e. opportunity).
Have anyone an idea ?
Thanks.

use if function like Uservalue(<role>)<> Administrator then one value otherwise another value. Hope it help, i never tried this, use the following syntax IIF(Uservalue(<role>)<> Administrator,value1,value2).
Cheers
Subbu

Similar Messages

  • Assigning Values to a Field Depending on Other Field

    Hi,
    I'm creating a survey that is used to capture data on a yearly basis. We are attempting to make the survey as self-validating as possible to minimize workload. One section of the survey asks for a yearly change in the number of people in a program, asking for both the number of people entering the program and the number leaving the program. We need this section to self validate by checking that the number of people in the program at the beginning of the year, plus the number added to it, minus the number leaving it, equals the number of people in the program at the end of the year.
    The validation formula for this is easy. The difficult problem is automatically assigning a value to the beginning of year value. We will know what this value is due to collecting a response from the program the previous year. My plan is for this field to self-fill depending on an earlier response to the selection of the program name.
    Suppose there is a question earlier in the survey asking for the program name, I'll call it ProgramName. This is a drop down list that must be selected from a list. I need the export value of the drop down list to be the program name they selected. My plan is that for the field later in the survey to fill like this:
    switch(ProgramName.value)
         case "Program1":
              currentfield = "1"
         case "Program2":
              currentfield = "2"
         default:
              currentfield = "0"
    Unforunately I am very new to writing JavaScript and don't know the syntext to get this result. Any help would be appreciated!
    Thanks

    What you're proposing is a custom calucalte script for the beginning of year value field that gets set based on the dropdown selection. I'd suggest setting the field value in the validate event of the drop down instead, in which case the code would look like:
    // Set the beginning of year field value based on this field's selection
    // initialize variable
    var begin_num = 0;
    switch (event.value) {
    case "Program1":
        begin_num = "1";
        break;
    case "Program2":
        begin_num = "2";
        break;
    case "Program3":
        begin_num = "3";
        break;
    // Set be beginning number field value
    getField("begin_num").value = begin_num;
    Where "begin_num" is the name of the field that will contain the beginning number.

  • How to set default value in one field depending on other field.

    Hi,
    I have one requirement.That is..One seede page having 2 field, one is Lov Input field and one more message choice filed.
    Requirement is after selecting value in Lov input field need to set one default value in to Message choice field. how to do this one.pls send any sample code for this requirement.
    Thanks in Advance,
    Hanimi...

    Hi,
    I used following code
    OAMessageLovInputBean lovbean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("AssetNumber");
    OAMessageChoiceBean Choicevalue=(OAMessageChoiceBean)webBean.findIndexedChildRecursive("EamWrPriority");
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if(lovInputSourceId.equalsIgnoreCase("AssetNumber"))
    if(lovbean!=null)
    String slovVal=(String)lovbean.getValue(pageContext);
    String prValue = getPRValue(pageContext.getApplicationModule(webBean).getOADBTransaction(),slovVal);
    //String prValue = "1";
    Choicevalue.setValue(pageContext,prValue);
    }// end of processFormRequest
    private String getPRValue(OADBTransaction con,String slovVal)
    // System.out.println("In WorkRequestDffCO.getContextValue.organizationID" + organizationID);
    String prValue = null;
    String sql = "select decode(ml.meaning,'AC1',1,'AC2',1,'AC3',3,'AC4',3,null) from FND_LOOKUP_VALUES_VL ml ,mtl_serial_numbers msi where ml.lookup_type = 'MTL_EAM_ASSET_CRITICALITY' and msi.ASSET_CRITICALITY_code = ml.lookup_code and msi.serial_number = 'slovVal' ; //'30AC-TR002B'"
    Statement st = null;
    ResultSet rs = null;
    try
    st = con.createStatement(1);
    rs = st.executeQuery(sql);
    if(rs.next())
    prValue = rs.getString(1);
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    if(st != null)
    st.close();
    if(rs != null)
    rs.close();
    catch(Exception e)
    e.printStackTrace();
    return prValue;
    Query is executing but no value is retuning, if i use hard coded value in where condition like '30AC-TR002B' it is tt's returning value .

  • Setting field value from antother field

    I am having problems setting the value of a field depending on the entry of a previous drop down field.
    I am creating some wizard pages. On one page i wish a drop down list to populate another field. The drop downlist is unbound. (I have tried doing this with bound field aswell). To do this I have the Depends on Item of the target field to depend on the dropdown list field, so that the appropriate values are updated. (i have tried with the target field being bound and unbound aswell not that it should matter).
    I have then updated the VO (view object) adding transient fields when the fields are unbound. Then i updated the view row class. The setter of the drop down field was used to set the value of the target field. (Using the setter of target field). I added system.out.println and the fields are called and set accordingly. ie getters and setters are correct.
    However when i run the screens the target field value is not set with the value within the getter of target field.
    Could you advice if this is a bug or whether i should be coding this in a different manner. (if it is a bug and you tell me when it is likely to be fixed and any alternative work arounds).
    Cheers
    Alan

    Alan,
    Not really a bug, but "missing functionality". The problem is that ADF Faces will only refresh a UI Component value from the underlying model binding value when you submit the request with immediate="false", OR when you explicitly call resetValue() on the component.
    We have added a new boolean item-level property "Clear/Refresh Item When Depends-On-Item Changes" in the latest build.That property will do the trick for you: it will clear the value and call resetValue on the UI Components of the dependent items, BEFORE the depends-on-item model value is updated. So, in your case, the setter method of your depends-on-item attribute will update your dependent item after JHS cleared the item, and you will see the new value right away because UIComponent.resetValue() was called as well.
    Steven Davelaar,
    JHeadstart Team.

  • Changing value of a field in mapping as per condition

    Hi Experts,
    I have one requirement in IDoc mapping to EDI structure.
    I want to change the value of a field depending on the condition. But the problem is the field is mapped at higher level than the condition.
    For example:
    Say i have a source structure in IDoc with name Source1 and target structure Target1. Source1 is mapped to Target1. Both of these structures have multiple occurances. So in general out structure will look something like below:
    Source1-> Target1
    Source2->Target2
    Source3->Target3
    Now i want to change value of one field from Target1 structure depending on Value of one field from Source3. At the runtime when Target1 structure is getting filled Source3 value is not visible so I am not able to set a proper condition.
    When at lower level we get value of Source3 can we change value of already filled structure Target1?
    Thanks,
    Atul

    Hi Aamir,
    Thanks for your reply.
    If possible can you give any sample code for this kind of UDF?
    Thanks,
    Atul Patil

  • PO Form with Terms & Conditions that Change Depending on a Value in Another Field

    Hi - I have read through the relevant topics in this forum and have attempted several of them without luck. I am currently working on a form in which there is an empty JFMain (I do not want to populate fields on this page since I don't want things in this page my "static" header - logos, title, etc. since the Terms and Conditions pages should not show any of this.) On my page 2, I have subforms for all my fields except my Terms and Conditions. (These fields are controlled by a data file.) On my remaining pages I have 3 sets of Terms and Conditions - all about a page long - hard-coded as text and placed in subforms with a dummy field off page to ensure they print. What I want to do is print the subforms from page 2 and then the applicable terms from page 3, 4, or 5 depending on the value in a field located in one of the subforms on page 2. What I currently get is my subforms and then ALL my terms printing. Any thoughts?
    My preamble overrides look like this:
    ^define group:D_HEADER \field$POSITION\reserve".11",in\subformHEADER.
    ^define group:G_HEADER @group:D_HEADER.
    ^define group:dummy!FldNotAvail \groupG_Terms_Private_Commodity
    ^define group:dummy2!FldNotAvail \groupG_Terms_Private_Services
    ^define group:dummy3!FldNotAvail \groupG_Terms_Public
    ^define group:JfEndData!EndData @group:D_end.
    I had to place the JFEndData! statement into the Preamble since the last subform with fields called before the Terms subforms has a global field from another subform above it. For whatever reason, it was duplicating this subform after printing the Terms and Conditions.
    I tried adding a nested if statement into field that will control when I want each subform to print but it was ignored. I also tried hardcoding a group call into the preamble with the logic as well with no results. If someone has example code they can share, this would be great.

    I receive Adobe help forum posts via email and I've been saving a few for the pointers they contain. I have some saved that might help you out a bit...
    A reply to the "Please can some one help me out......." post by Mr BoJangles on 10/29/2007 gives some information about forcing a subfield to be displayed.
    A reply to the "Conditional logic" post by Marco Degl'Innocenti on 8/2/2006 gives information on initiating a subform based on the value of a field in the data stream.
    A reply to the logic post by Marco DeglInnocenti on 2/22/07 also gives information on initiating a subform based on the value of a field.
    I hope these can be of help. If you can't access them on the forum I can repost them.

  • Exsistance of a node depends on a value of source field.

    I need to do  graphical mapping such that the exsistance of a node in target side depends upon the value of a field in sorce side. Can some one tel me how to proceed?

    Hi Pooja,
    use can use"createIf" function.Ur problem will be solved
    check here how to use createIF function...
    /people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool
    Read this http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm
    And check these threads
    Createif node function
    Regards
    BILL
    <b>**reward with points if it helps u!!</b>

  • Check or Uncheck a messageCheckbox field depending on a LOV field value

    Dear Gurus,
    Please let me know if we can check or uncheck a check box field based on a value in LOV field in a OAF Page. I need to know if we can do this without touching the code in controller, is it possible? Please provide your valuable thoughts.
    The requirement is something like say, if X is a value in LOV, we need to check the checkbox else we need to uncheck the checkbox
    Thanks in Advance,
    Affy

    You could try workaround. Not sure whether this is feasible in your case.
    You need to modify (add a new column) the LOV query something like this :
    select decode(<column_name>, 'X','Y','N') checkbox_value,
    from .....
    where ....
    Make sure that the checkbox checked value = 'Y' and unchecked value = 'N'.
    Set this attribute as the return item to the checkbox.
    Cheers
    AJ

  • How do I make multiple fields dependent on a checkbox?

    I've got about 10 fields in an adobe form that I want to appear and be accessible if a checkbox is checked.  If the checkbox isn't checked, then I don't want them accessible or visible.  Is this possible?

    Sure it is. The code can be made much simpler if you use hierarchical naming for the fields. For example, suppose all of the fields that you want to show/hide have a prefix of "group1.", (e.g., group1.name, group1.address, group1.state, etc.), then you can use the following code in the Mouse Up event of the check box:
    // Get the value of this check box
    var v = event.target.value;
    // Show/Hide the group1 fields depending on the value of this check box
    getField("group1").display = v === "Off" ? display.hidden : display.visible
    It's often a good idea to reset the fields whenever they are hidden or shown, especially if the form data will be exported, so that the form data is consistent with the state of the form. If you want to do this, you could add this line to the beginning of the script:
    // Reset the group1 fields
    resetForm(["group1"]);
    If you don't use such a naming system, the second line of code would have to be repeated for every field in the group, using the indivudual field names of course, and the resetForm statement would have to include multiple array elements for the names of the individual fields.

  • Search a value in one field contained in different tables

    In my database, a field name is used in more than one table. For example, the field 'ITEMCODE' is available in TABLE1, TABLE2, TABLE3, etc... Can anyone please suggest a query to search a particular value in this field in all tables ? Thanks for your answers.

    The query you need depends on the datatype of the column you need.
    you could try this for a number:
    select 'select '||column_name||' , '''||table_name||''' table_name from '||table_name||' where '||column_name||' = '||Yournumbervalue||' union '
    from user_tab_cols
    where column_name = 'Your_column_name'or a varchar2:
    select 'select '||column_name||' , '''||table_name||''' table_name from '||table_name||' where '||column_name||' = '''||YourVarchar2value||''' union '
    from user_tab_cols
    where column_name = 'Your_column_name'user uppercase for Your_column_name, strip off the last union and you might have what you're looking for...

  • Setting the value of a field based on a dropdown list

    I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
    The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
    The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.

    Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
    Alan

  • Fields required based on a value in another field

    Hi,
    I am looking to have fields required (Annual Revenues and # of Employees) based on the value of another field (Ownership). Basically, if the value is Public the user is required to enter the Annual Revenue and Employees fields. I thought about using dynamic layouts but the only key field for Accounts is Account Type.
    Thanks,
    Caryn

    Hi Caryn!
    I think it is not possible for making #Employees and Revenues required depending on Ownership(as it is a look up field).. it should be possible if you want to do it on any other criteria other than ownership by just renaming the Account Type, Disable all the values of Account Tyope add new values to Pick List and make it driving picklist upon your requirements..
    If you require Account Type, create a custom picklist "Account-Type" and add the values.

  • How to display f4 help for a field based on value of another field

    Hello All,
    I have 4 fields : Sales Org : VBAK-VKORG, Distrib Channel : RV50A-VTWEG, Div : RV50A-SPART, Sold-to-party : KUAGV-KUNNR.
    The second field depends on the first one, the third on the second one and the fourth on the first field.
    However, when each of the second third and fourth fields' f4 help is displayed, the values are independent of the previous fields. How do I set the f4 help to display values based on the respective fields?
    Regards,
    Mithun

    Please be sure that you are searching the forums before posting. This exact same question was asked just yesterday:
    F4 help to input field
    In particular study the section and the linked help document for ddic search helps export/importing parameters and the requirements for DDic Structure/table usage for the parameter mapping.

  • Difficulty in setting value of a field at runtime

    I have a form with input text fields. One of the fields is disabled and automatically filled by the system. I am having problem filling this field at runtime.
    What I did was that I tried to set the value of the field during the save operation (that is when I clicked on the save button). The system sets the value of the field but it did not commit the value into the table. This is is the code that I used
        public String SaveParameterRecord() {
           this.codeTypeId.setValue("GB011");
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
    Again I tried with with method call, but it gave me java.lang.NullPointerException at the point (this.codeTypeId.setValue("GB011"))
        public String CheckParameterMethod() {
             BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
             this.codeTypeId.setValue("GB011");  
            return null;

    hi Frank,
    The issue I see is that by putting this.codeTypeId.setValue("GB011"); wont be updating the model, and that is why after your commit, the value comes null. Is that variable depending on any other value? If you really want to update the model at that stage you will need to do something like;
      public static void setExpressionValue(String expression, Object newValue) {
          FacesContext facesContext = getFacesContext();
          Application app = facesContext.getApplication();
          ExpressionFactory elFactory = app.getExpressionFactory();
          ELContext elContext = facesContext.getELContext();
          ValueExpression valueExp =
              elFactory.createValueExpression(elContext, expression,
                                              Object.class);
          //Check that the input newValue can be cast to the property type
          //expected by the managed bean.
          //If the managed Bean expects a primitive we rely on Auto-Unboxing
          Class bindClass = valueExp.getType(elContext);
          if (bindClass.isPrimitive() || bindClass.isInstance(newValue)) {
              valueExp.setValue(elContext, newValue);
    And then instead using this.codeTypeId.setValue("GB011"); you will call setExpressionValue("#{bindings.yourVariable.inputValue}","GB011"). But then again I dont recommend you doing this.
    If this variable depends on another variable, you can use a setPropertyListener and autoSubmit=true.
    Regards

  • How to do readyonly field depending on some condition.

    Dear All,
    One seeded page in iProc having Table Region. That Table region having Item, Item Description, Quantity, Price, Amount etc....
    I need to do Quantity field as readonly for some Items only..
    Is it possible to do, if it is possible pls suggest how to do it..
    Thanks in Advance,
    Hanimi.

    1. Extend the underlying VO
    2. Create a transient attribute in the VO and set the value to true/false depending on yoru condition
    3. Use spel on the item(using personalization) to enable/disable the item based on the VO Attribute created.
    Refer to: http://oracle.anilpassi.com/spel-in-oa-framework-with-audio-visual-demo.html

Maybe you are looking for

  • Real Instruments - Input Volume

    Hi, I noticed that many USB capture devices have the input volume slider greyed out in the "new track" window for real instruments, although they have an USB controllable input volume. This you can see in the system preferences for audio. Here you se

  • HELP NEEDED Viewing pointers in Project Bin

    Hello, Last night I loaded 34 video clips into a project bin labeled DAY ONE VIDEO. Today, per the screen shot below, I can see that I still have 34 items in the bin (as seen in the upper right hand corner of the screen shot), but although the folder

  • I can not see some parts of web pages, some things are visible others not.

    In my mail program most of everything is viewable but the different styles that are available to use above the body of the message are not able to be seen. I can run my mouse over the different spots in the cell to see what that space is but you cant

  • Uploading Multiple files in One-Click!!!

    Hi All, I have got nearly about 900 PDF files in my file server which need to be uploaded to the KM CONTENT Repository. what is the best methodology to upload all these file in to the repository in <u><b>one click.</b></u> Is it possible to achieve t

  • ICal wont sync due to inconsistent data

    I get an error message saying... Calendars could not be synced due to inconsistent date. Confirm that your computers data is valid *+(not sure how to do this)+* then reset Calendars on .Mac in system preferences. *+( I have done this and had no luck)