Help to set value of an attribute based on value selected in another field

Hi all,
I want to set the value of an attribute STRUCT.ITM_TYPE to a default value whenever i select one of the value from dropdown list in LC_STATUS.
I tried to add an event in the get_p method of the lc_status but there i cant able to access the context of the ITM_TYPE as the fields are in different views.
Please Help,
Rewards will be awarded.
Naveenn

Hi Vineet,
Thanks for the suggestion.
Please chech my code and suggest me for any corrections.
In the Get_P_LCSTATUS method of Context Node BTADMINH in View1.
METHOD GET_P_LCSTATUS.
  CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
    WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
      rv_value = 'ACT_STATUS_SELECTED'.
  ENDCASE.
ENDMETHOD.
In event handler method in Context Node BTADMINI in View2
method EH_ONACT_STATUS_SELECTED.
* Added by wizard: Handler for event 'ACT_STATUS_SELECTED'
data: lr_ent1 type ref to cl_crm_bol_entity,
         lr_ent2 type ref to cl_crm_bol_entity.
lr_ent1 = me->typed_context->BTADMINH->collection_wrapper->get_current( ).
check lr_ent1 is bound.
* To Get Value of First Attribute
lv_attr1 = lr_ent1->get_property_as_string( 'LC_STATUS' ).
* To Set Value of 2nd Input Field now based upon this value
lr_ent2 = me->typed_context->BTADMINI->collection_wrapper->get_current( ).
*lr_ent2->lock( ).
lr_ent2->set_property_as_string( iv_attr_name = 'ITM.TYPE'  iv_value = 'RREQ' ).
endif.
endmethod.
but during syntax check its showing error messge as BTADMINH is unknown.
2) How and where to bind the context node in custom controller.
Please help.

Similar Messages

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • To get the value in a field based on lov selection of another field.......

    Hi all,
    I have a requirement where
    i need to select a LOV value
    and based on that value the field next to it should be generated......
    in brief suppose i have a field name EMPLOYEE NO as lov........
    as i select the employee number the field next to it assume EMPLOYEE NAME should be retrieved based on the employee number selected..
    hope i am clear
    waiting for ur responce.....
    DEV......

    Hi,
    Assuming you are having two fields on the page. One LOV for empID (ID: empIDV) and messageTextInput for emp Name (ID: empNameV)
    1) Create a VO for your LOV having a query like SELECT emp_num, emp_name FROM employees;
    2) Create region for LOV using table using wizard based on the VO created above (choose emp_num as messageStyledText and emp_name as formValue). Also make search allowed true for emp_num.
    3) Create a LOV map1:
    LOV region item: empId
    Return item: empIDV
    Criteria item: empIDV
    4) Create lovMap2:
    LOV region item: empName
    Return item: empNameV
    Also try to implement dependent LOVs : http://sushantsharmaa.blogspot.in/2012/12/10-dependent-lov-in-oaf.html
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • The drop down list values want to vary based on the contents of another drop down field

    hi,
    hi in search page i have two drop down list. i have two tables and one mapping tables. service line and subservice line are tables and i have one mapping table. using rapid application i create one component using mapping table. now in search page i have two drop list. one is servline and another is sub serviceline. in service line i have values like 1,2 k  for subservice 3,4.5,6 for one service line ex. for 1 i have two subservice 3,4 and for 2 i have 5,6. now my requirment in if i choose service line 1 in first drop down list, automatically in second drop down list want to contain values 3, 4. before both the drop down list have values.if i chose one value the correponding mapping value want to come in drop down list in same context node.

    Hi,
    This requirement involves defining p-getter for the service type, and the v-getter of you sub type.
    Since this involves to populate the values of subtype attribute depending on value of service type, u need a round trip.
    This is done in the p-getter of the 1st attribute(service type in your case).
    In the v-getter of the 2nd attribute, 1st fetch the current value of attribute 1, then filter the value in the dropdown table according to ur logic.
    Ref :Drop down values in table view
    Regrads
    Anish

  • Field Populates based on Selection in Another Field

    Hi everyone,
    I have created a new position description template using a pdf form. In this form I have various fields. I would like to populate one field based on what I have selected in another field. For example, I have a field called competency. In this field I can select and choose a competency. If I select "Accountability" I would like the description field to say " Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. " alternatively if I select "Compliance" I would like the description field to say "Complies with policies, procedures, workflows and instructions." Can anyone assist me with script or is there another way of making this happen.
    Thanks in advance

    I think this is what you are looking for:
    Make sure that you select "Commit selected value immediately" in the options tab of the drop down menu.
    //Place this script in the custom validation script of the drop down menu
    //Create a text field caleld Text2
    var MySelection = event.value;
    switch (MySelection) {
    case "Accountability":
        this.getField("Text2").value = "Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. ";   
    break;
      case "Compliance":
        this.getField("Text2").value = "Complies with policies, procedures, workflows and instructions.";
        break;
    I hope this helps.

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • Insert value into a column based on value of another column

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance.

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance. I'm not sure what you mean when you insert a value into a
    record, but if you are setting a value in a column of the same
    record using a trigger, then it's easy.
    :new.COL2 := ....:new.COL4...
    :new.COL3 := ....:new.COL4...
    The trigger must be 'INSERT or UPDATE' and 'FOR EACH RECORD'.
    If you are setting a different record in the same table, the
    solution is much more difficult.

  • How to change the values in an LOV based on values selected in another LOV

    Hi,
    I have a requirement in ADF where there are two LOVs. Based on the values that I select in the 1st LOV, the values in the second LOV should change dynamically.
    Also, the 1st LOV accepts 3 values, for every value I select, a different query is executed to populate the 2nd LOV.
    I have a rough thought that I can use 3 different read only view objects containing these 3 queries. And based on the value I select in the 1st LOV I can execute the corresponding View object from the backing bean. But my doubt is how to link the results of that query that is executed to populate the 2nd LOV.
    Thanks in advance.
    Edited by: 886591 on Sep 21, 2011 4:48 AM

    Hi Brisk,
    Thanks for your reply.
    The link that you have provided explains how to disable and enable the other LOVs based on a parent LOV. But in my case there are two Select One Choice fields i.e. the dropdowns (sorry that I addressed it as LOV in my previous post which might be confusing). There are 3 static values in the parent dropdown where each of them are associated with a different query. for e.g if the three values in the drop down are A, B and C; if i select A, then query associated to A should be executed ; if i select B, then query associated to B should be executed and if I select C, query associated to C should be executed. Then the output attribute of that query should be populated in the child dropdown.
    Please let me know about the solutions to this.
    Thanks,
    Kavitha

  • Pre-Populate Dropdown based on information selected in another dropdown

    Hello,
    I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.
    Example
    City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.
    Field/List 1: New York, NY <-- Selected City, State
    Field/List 2: New York, NY <-- Auto Populated based on field 1
    Field/List 3: New York, NY <-- Auto Populated based on field 1
    Field/List 4: New York, NY <-- Auto Populated based on field 1

    In the exit event of the first State field, using Javascript, something like this should work:
    State2.rawValue = this.rawValue;
    State3.rawValue = this.rawValue;
    State4.rawValue = this.rawValue;
    ...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.
    Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,
    Brian

  • How to populate a dropdown box based on a selection in another Dropdown box.

    I am trying to find out a way to do the following:
    I am using coldfusion ....working on a form. The form has
    couple of dropdown boxes. Based on the selection on the first
    dropdown box another dropdown box needs to get populated with
    different options. These options will be coming from a query. I am
    trying to find out the Javascript code for doing this.
    Thanks in advance.

    jchopra,
    There's a method to doing what you're wanting to do that I've
    used extensively.
    Basically, within my code, I start by invoking the method
    that returns the data for the dropdown lists. Then, I use the
    following code to pour the data returned into a javascript array:
    var locArray = new Array(#evaluate(locs.recordcount+1)#);
    locArray[0] = new Array('','','','','','','','','',);
    <cfloop query="locs">
    locArray[#locs.CurrentRow#] = new
    Array('#JSStringFormat(locationId)#',
    '#JSStringFormat(fkyPolicyId)#',
    '#JSStringFormat(locationNumber)#',
    '#JSStringFormat(description)#',
    '#JSStringFormat(address1)#',
    '#JSStringFormat(address2)#',
    '#JSStringFormat(zipcode)#',
    '#JSStringFormat(city)#',
    '#JSStringFormat(state)#';
    </cfloop>
    Then I wrote a javascript function that is assigned to the
    first dropdown's onChange() event. When the user changes the value
    that is selected within the dropdown, I use javascript to locate
    (using the policyid) the corresponding record in the javascript
    array and populate and/or select the appropriate value(s) in the
    second dropdown.
    If the data returned from the method invocation is too large
    to use within a javascript array, you may need to limit the results
    that are returned.
    Hope this makes sense. If not, please let me know.
    ds

  • Populate field based on selection from another field?

    I'm using a Data Connection with a SQL query that returns two fields (StNameFull and ADDRKEY). I have a drop-down list called "Address" with the list items dynamically bound to StNameFull, so the user can select the address.
    What I'm trying to do is populate the second field "Key" with the corresponding record, based on the selection made from the drop-down list.
    Is it possible to script this so that when the Address is selected the Key will automatically fill in with the key that matches the address selcted?
    I currently have "Key" as a text field bound to ADDRKEY, but not sure how to have it check what was selected in "Address"
    Thanks so much,
    - Kevin

    Yes it is possible but you will have to write some script to do it. You wil also have to ge the DataConenction to execute a SQL statement. There is a good blog on this topic at this location:
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Paul

  • Infopath: How to load data in one field based on value selected in another field

    We have a drop down list field in the infopath form and we have some more fields that should change depending on the dropdown selection. 
    How can we achieve this please ?
    Thank you !

    Hi Prajk, sounds like you want to do cascading dropdowns. If so, see the link below. If you're just trying to enter information into a field (not a dropdown) based off the value of the dropdown, then set a rule so that if dropdown = "this," set
    the field's value to "this."
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    cameron rautmann

  • Issue in populating values in a column based on values in other columns

    I have a situation as below:
    Src        Tar             New tar
    AC001  TAC001  
    AC002  TAC001      AC002
    AC003  TAC001
    AC011  TAC011
    AC012  TAC011      AC012
    AC021  TCA021
    AC022  TCA021
    Now, wherw I have New target as AC002, I need to copy the same value to TAC001 which is the 1st and 3rd row. Similarly, I need to copy AC012 to 4th record. And my last 2 rows will be null as I do not have any values for TCA021..Any thoughts on this would be apprecated..
    Thanks in advance..

    Hi
    almost all is said so i tip you How to Fish (with Pictures) - wikiHow because it is good asset for future when you are hungry
    Read also http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174
    "Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time.
    Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. All joins and all WHERE, GROUP BY, andHAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDERBY clause.
    Analytic functions are commonly used to compute cumulative, moving, centered, and reporting aggregates."

  • Setting current row of a view based on row selected from another view.

    Hi,
    We have two Views V1 and V2. Both views are based on the same tables except that V1 is based on multiple tables. In our application we are showing a read only table which is based on V1. The user can select a particular record for edit. But the edit page is based on V2 and as a result the first record always shows up for editing even though the user may have selected another record.
    Is there a way we can pass the primary key of the record selected from V1 to V2 and set that record as the current record.
    We have tried setCurrentRowWithKey, but this did not help.
    Regards
    RHY

    Hello,
    post the PK as an URL parameter within the link you open the edit page. Then read this parameter in your page (the page with this link) action class and send it to an ActionBinding:
    JUCtrlActionBinding action = (JUCtrlActionBinding) bc.findCtrlBinding("nameOfBinding");
    ArrayList arrayList= new ArrayList();
    arrayList.add(0,primaryKey);
    action.setParams(arrayList);
    action.doIt();
    In your AppModule create a method nameOfBinding with primaryKey as in parameter
    public void nameOfBinding (Number primaryKey )
    getV2().setWhereClause("PRIMARY_KEY=:0");
    getV2().setWhereClauseParam(0,primaryKey );
    getV2().executeQuery();
    In the AppModule you have to publish this method in "ClientInterface".
    Create an Action binding for this method in your list jsp.
    Hope this helps
    Britta

  • Is there a way to fill a cell with a value based on the selection from another cell?

    For example: If have a drop down menu created for Cell A1 with options (Dog 1, Cat 2, Bird 3). Is there a way to fill cell A2 automatically when I select from the drop down menu.
    So if I selected 'Cat' in A1, cell A2 would automatically input the 2.

    I suggest an extensible method that allows you to add other animals:
    This method adds a small table called "Animal Lookup" that matches names (same as in the pop-up menu) with a value.
    The table on the left uses this table to retrieve the value based on the animal:
    B2=VLOOKUP(A2, Animal Lookup :: A:B, 2, 0)
    select B2 and fill down

Maybe you are looking for

  • E72 - How to import image from pc to E72 in galler...

    Hi! i want to import my photos on pc to e72 on month folder by a date of getting this photos. please help me!

  • I am trying to access iPhoto from my MacBook Pro on my iPhone 5s

    I am trying to access iPhoto on my iPhone 5s from my 2008 MacBook pro. I have synced both devices, have set up iCloud, have downloaded iOS7 and Mavericks, and have photo sharing and photo stream turned on on the iPhone. I am using iPhoto '08, version

  • Access address book on iphone without syncing?

    The screen has stopped working on my girlfriends iphone and she needs to access her contacts before it's replaced tomorrow, is there a way of accessing the address book without having to sync it to my computer as her mac is at home? I dont want to ha

  • Add Image Metadata as Text in SlideShow?

    I have a slideshow in Premiere Pro CC 2014. I've taken the time to add a 'description' or captions within the metadata of the images themselves. I'd like to create a text field at the bottom of the slideshow so that the field queries the photo descri

  • Layer Comps to Files v2.0 - Error

    I used to have an extension for Photoshop where, similar to the Layer Comps to Files, would export not only layer comps in a file but of an entire folder from your finder. Once I got creative cloud, that extension disappeared - when I try to install