Cond display of drop down based on value selected in another drop down form
Hi,
I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
Currently I have 2 drop downs.
First drop down is a list of Jacks from 2000 to 4999...
Second Drop down consists Chassis ranging from 1 to 900..
So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
Can someone please provide me pointers on how to do this..
Thanks,
Nehal
Hi Larry,
Thanks for your response..
Here are the queries for my select lists.
P62_JACK
select list query for Jacks:
select JACK_NUM display_value, JACK_NUM return_value
from CTS_LIST_OF_JACKS
order by 1
P62_CHASSIS_BLADE_PORT
select NETWORKPORT display_value, NETWORKPORT return_value
from CTS_LIST_OF_NETWORKPORTS
order by NETWORKPORT_ID
jacks range from 2000 to 4000
chassis_blade_port ranges from 100 to 900...
Can you please let me know how to do it..
Thanks,
Nehal
Similar Messages
-
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 AMHi 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 -
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 -
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.
NaveennHi 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. -
How to update one lov based on value selected from another lov.
Hi ,
I have a form in which I created the 2 LOVs for my event_date field and event_name field each which is stored in one table.
t I want to update the event_date LOV everytime event_name is selected.
How can I achieve this.
Thanks.
Neeti.Hi,
You can do this using dynamic LOVs. Here are the steps for populating a employee LOV on selecting a department.
1) Create a dynamic lov say emloyee_lov with a bind variable like this
select empno,ename from scott.emp
where deptno = :dept
2) Create a form on scott.emp.
3) In the empno field which should be a LOV type of field, associate it with
the above employee LOV.
4) Then set the binding(s) for the bind variable(s) defined in the lov by
selecting the deptno column.
This would help.
Thanks,
Sharmila -
Dynamically display title based on value selected in column selector
Hi All,
Can it be possible to show the report title dynamically based on value selected in column selector . suppose i have two column status and region . When i will select status in the column selector the title of the report will show " Status Summary" when i will select region then the title will change to "Region Summary". Please help me...Hi,
create dashboard prompt with column selector functionality like following way
write the following query in your dashboard prompt sql results
select region name from subject area name
Union all
select sub_region name from subject area name
like this and put one presentation variable for this dashboard prompt like var1
in your report write formula in your column like this *case when @{var1)='region column' then 'Region Summary' else ' ' end*
and refer this column in narrative view like @1 then narrative act like a title view.
Hope this helps you
Regards
Naresh -
Want 2 populate value in 2nd list item based on value selected in 1st list?
Want 2 populate value in 2nd list item based on value selected in 1st list?
Gaurav -
The 3rd list will not populate because nothing has been selected yet in list 2. The value in list 2 is null, so the loop to populate list (3) has nothing to load. Try the following below. This should seed your 2nd list so the 3rd list will populate.
You will have to declare first_record boolean and first_value to match DESCC.
first_record := true; -- NEW *****
Clear_List('BLOCK2.ITEM2');
FOR CurRec IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.IDD = :BLOCK2.ITEM1)
LOOP
if first_record = true then -- NEW SECTION *****
first_value := CurRec.DESCC;
first_record := false;
end if;
Add_List_Element('BLOCK2.ITEM2',1,CurRec.DESCC,CurRec.DESCC);
END LOOP;
:block2.item2 := first_value; -- NEW *****
Clear_List('BLOCK2.ITEM3');
FOR CurRec2 IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.DESCC = :BLOCK2.ITEM2)
LOOP
Add_List_Element('BLOCK2.ITEM3',2,CurRec2.DESCC,CurRec2.DESCC);
END LOOP;
My name is Ken, 1990 is when I started using Oracle Forms 3.0, character based in the Unix environments. And you are very welcome. -
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
LeeThis 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 -
Populating values in dropdown based on values selected in second dropdown.
Hi,
I have two listboxes on the screen. Based on value chosen in first dropdown, I want to populate the values to be selected in second dropdown. How can i achieve this? I would be glad if anyone can help me out with this requirement.
Thanks,
Ameet<font color=blue>Hi,
<li> Place 2 input fields on screen.
<li>Set Listbox property as it is shown in the below link.
<a href="http://2.bp.blogspot.com/_O5f8iAlgdNQ/SmPSPnRa0tI/AAAAAAAAFCQ/wW_URP-ld6o/s1600-h/drop_down-770536.JPG" target="_new">link to dropdown setting</a>
<li>Set function code to first dropdown box to trigger event when you select value from first dropdown box. So that second one is changed.
<li>Declare variable like below in TOP include of the module pool program.
<pre>DATA: g_drop_1 TYPE char10,
g_drop_2 TYPE char10,
ucomm TYPE sy-ucomm.
TYPE-POOLS vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.</pre>
<li> Use screen flow logic of the screen like below
<pre>"PROCESS BEFORE OUTPUT.
PROCESS BEFORE OUTPUT.
field g_drop_1 MODULE drop_down_1.
field g_drop_2 MODULE drop_down_2.
"PROCESS AFTER INPUT.
PROCESS AFTER INPUT.
field g_drop_1.
field g_drop_2.</pre>
<li>Corresponding code for two drop down boxes.
<pre>&----
*& Module DROP_DOWN_1 OUTPUT
MODULE drop_down_1 OUTPUT.
CLEAR: list[],g_drop_2.
name = 'G_DROP_1'.
value-key = '1'.
value-text = 'value_1'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'value_2'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'value_3'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'value_4'.
APPEND value TO list.
CLEAR value.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDMODULE. " DROP_DOWN_1 OUTPUT
*& Module DROP_DOWN_2 OUTPUT
MODULE drop_down_2 OUTPUT.
CLEAR list[].
name = 'G_DROP_2'.
CASE g_drop_1.
WHEN 1 OR 2.
value-key = '1'.
value-text = 'text1'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'text2'.
APPEND value TO list.
CLEAR value.
WHEN 3 OR 4.
value-key = '3'.
value-text = 'text3'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'text4'.
APPEND value TO list.
CLEAR value.
ENDCASE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDMODULE. " DROP_DOWN_2 OUTPUT</pre>
Thanks
Venkat.O</font> -
Contents of second prompt list based on value selected in first prompt?
I need to display two prompts: "Product Family" and "Products". When the user selects a product family, I need the list of products to be filtered to the selected product family. In other words, the contents of the second prompt's list needs to be based on the value selected in the first prompt. Can this be done in Web Intelligence?
Hello Waters,
Yes, this can be done in web intelligence if you apply cascading prompts at universe level
or
Yes, the second way is use element link in report block between 2 tables one for product family and one for product list ( you don't need prompts in this case...)
Regards
Subbarao M -
How to make a value changed based upon values selected in dropdown menu
Hi,
I am making my first Dreamweaver website using Dreamweaver CS6 on a windows 8 PC.
I am trying to make a website where the user selects different criteria; in this example an ipod's model, condition and size from three seperate dropdown selections (similar to www.itrado.co.uk) and then based upon these selections a value for their ipod is shown. However i cannot work out how to display a value which remains on the same page and changes based upon the values which have been selected from the dropdown boxes. I was planning on creating a database and then creating a simple code which retrieves the value from the database which corresponds to the three selected values, however i am not sure how to go about doing this.
Any help would be greatly appreciated.
Many Thanks,
HenryYou need scripts for this. Try this jQuery tutorial
http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/
Nancy O. -
Dashboard Prompt - Bypass filter based on value selected in prompt
Hi All
I need to create a dummy dashboard prompt that has displays two values 'Y' and 'N' (Yes and No). If 'Y' is selected, I want the report to 'Filter based on the results of another request'. If 'N', then the report takes the usual filters (not taking the 'Filter through another request' filter).
I have achieved this in the report filter by using an 'OR' clause (The Project Number is in Project Number Report OR 'N' = 'N' (presentation variable from the prompt) ). So if 'N' is selected the OR clause is satisfied and the results from the report are not taken in. If 'Y', the results from the report are taken in. This part is fine.
The problem is, on the dashboard prompt, there are a few constrained prompts. When these are selected, WHERE clause is attached 'N'='N' (the clause above). So when 'Y' is selected in the prompt, the condition fails and the constrained prompts do not show any results.
So, basically the idea is: How do I make my report run against 'Filter based on results of another request' when 'Y' is selected and bypass this (i.e. take the other filters) when 'N' is selected (Keeping in mind the constrained prompts).
Thanks
AnanthHi
I searched a little and found the following link
http://obiee101.blogspot.com/2009/02/obiee-switching-between-filters.html
This half-solves my problem. The issue is that, the above link uses a example of a dashboard prompt where there is only one 'Yes/No' prompt. What if there is a constrained prompt as well. In that case, when Yes/No is selected, a WHERE clause will be attached to the Constrained prompt (saying 'NO'='YES') and it will show 'No results'.
Thanks
Ananth -
Populating the 2nd dropdown based on value selected on 1st dropdown
Hi,
I know that there is a similar post about this in the forum but it doesn't actually show how an event for the dropdown is created. I believe this would be a script that is done within the form (transaction SFP) itself, but could I please have an example please?
I did try to take a look at the standard ISR_FORM_SPTD form but there doesn't seem to be any scripts in this form.
Thanks and regards,
Adeline.Hi,
Am not so sure, how were unable to locate this script. Click on the dropdown and check in the Script editor. You will get the same script. Anyways, here is the script.
<i>// If the display value is used in the data DOM,
// re-assign the corresponding data value
if (this.rawValue != "" ) {
if (this.boundItem(this.rawValue) != "") {
this.rawValue = this.boundItem(this.rawValue);
// START OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";
app.eval("event.target.SAPSubmit(false);");
// END OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
data.RequestPromotion[0].PCR_PAGE1.PCR_DE.PCRDEContent.NewScaleLevelDDL::ready:form - (FormCalc, client)
// START OF XFO CODE - DO NOT REMOVE OR MODIFY
// If this object exists, then we are not being rendered by the XML Form Agent
if ((Exists(xfa.host.appType)) and ($.bind.ref <> "")) then
// Note the rawValue and try to set the selection if it is present
// As soon as you add items the rawValue will be lost
var CurrValue = ""
// Check for a null - an empty XML node will return a null
if ($.rawValue <> null) then
CurrValue = $.rawValue
endif
var Found = 0
// the data binding may contain "$data.<root data name>" instead of $record
var DataBinding = replace($.bind.ref,Concat("$data.",xfa.record.name),"$record")
DataBinding = replace(DataBinding,"[*]")
for i=0 upto xfa.record.enum_list.nodes.length - 1 step 1 do
// Find the match. The binding value may contain "[*]"
// so remove them first
var ListBinding = replace(xfa.record.enum_list.nodes.item(i).binding.value,"[*]")
if (DataBinding == ListBinding) then
// the first two items are the name and binding attributes, then the list starts
if (xfa.host.version < 7) then // add a dummy item to work around a bug in A6
$.addItem("a","-1")
endif
$.clearItems()
for j=2 upto xfa.record.enum_list.nodes.item(i).nodes.length - 1 step 2 do
// The order is assumed to be display and then data
// if the value is null, then add the empty string
if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) then
$.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,"")
else
$.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value)
endif
if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == CurrValue) then
Found = 1
endif
if ((xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) and (CurrValue == "")) then
Found = 1
endif
endfor
// Now set the selection - omitting this step means there will be no selection
// if there is only one item in the list and no default value, we have to select the first item - Bug in Acrobat 6.02 (fixed in Acrobat 7)
if ((xfa.record.enum_list.nodes.item(i).nodes.length <= 4) and (CurrValue == "") and (xfa.host.version < 7)) then
$.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
else
// if available, set the selection to the default value
if (Found) then
$.rawValue = CurrValue
else
// otherwise: set the selection to the first item
$.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
endif
endif
// START OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
// END OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
break
endif
endfor
endif
// END OF XFO CODE - DO NOT REMOVE OR MODIFY</i>
This should solve your problem.
Regards
<i><b>Raja Sekhar</b></i> -
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....? -
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
Maybe you are looking for
-
After Effects Production Premium CS3 on Windows Vista. AE Worked great for about 10 Projects then on Export to Quick Time started crashing. 1. Question AE Export to QT Movie -(Default Settings) Crashes half way thru Export to QT get a Error 0 : : 4
-
Safari/FireFox Preview Problem on iMac
Running the latest Snow Leopard and Dreamweaver CS4 on iMac. Developing a site in PHP after installing XAMPP. Go to preview a page in both Safari and Firefox and all that shows up is the text and question marks where images are suppose to be. The ser
-
Does restoring an ipod classic (prior format on Mac) in Windows delete music?
Does restoring an ipod classic (which was previously formatted on a Mac) in Windows 7 delete the music already on ipod?
-
Does anyone have or know where I can find sample code showing how to process dynamic sql statements? I am using Windows NT and Oracle 8.1.5. I have developed a fairly good API for my application but only using static SQL. I now wish to advance to usi
-
SharePoint 2013 get Term's "other label" to text column
Hi, does anyone now how to do or has anyone done following with SharePoint 2013. What we would need to happen is when user selects value from managed metadata (the main label) then the terms synonym/other label would be stored to text field. So lets