Update Drop Down based on selection in Option group
Good afternoon all-
I've got an option box ('PanelStatus') with two options: "Panel" (value of 1) and "Non-Panel" (value of 2).
On the form where this is located, I have a drop down box filled with names. These people on this table are either Panel or Non-Panel. So, my idea is that the drop down with names will be refreshed when the radio buttons in PanelStatus are clicked.
I've got a query that will return the right results, based on what's selected in the Option Group. However, when I set the Option Group after update event to refresh the dropdown box, Access is telling me "Object doesn't support this property
or method".
Any ideas/help are welcome!
EDIT: I'm thinking it may be because the drop down is unbound...? Does that explain why this is not working? If so, any ideas how to do this with the drop down remaining unbound?
The After Update event of an option group works whether the option group is bound or unbound.
You should use the Requery method of the combo box.
Regards, Hans Vogelaar (http://www.eileenslounge.com)
Similar Messages
-
How to get value in Second Drop Down based on selection made in first dropd
Hi All,
I have a table with first two columns as dropdown.
The values in first drop down are fixed. However the value in second dropdown should be populated based on selection made in first .
e.g
First Column had different departments say IT, SALES, HR.
Based on department selected I have to populate employee of that department.
For first dropdown I have taken Drop down by index.
What should I select for second drop down and achieve desired functionality? Please guide.
Regards,
MadhvikaHi
Use drop down by key for fixed values IT, SALES, HR. create on_select action for that drop down.
in on_select method code like this..
DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
DATA ls_segment1 TYPE wd_this->Element_segment1.
data lt_segment1 type wd_this->elements_segment1.
DATA lv_segment TYPE wd_this->Element_segment1-segment.
data lr_column type ref to cl_wd_table_column.
navigate from <CONTEXT> to <SEGMENT1> via lead selection
lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
get element via lead selection
lo_el_segment1 = lo_nd_segment1->get_element( ).
lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
get all declared attributes
lo_el_segment1->get_static_attributes(
IMPORTING
static_attributes = ls_segment1 ).
now ls_segment1 contains your first drop down selection value.
DATA : lv_dropdown type string .
lv_dropdown = ls_segment1-segment.
if lv_dropdown = 'IT'.
// here fill your second drop down based on IT value.
endif.
Hope it solves.
Cheers,
Kris. -
Changing value in drop-down based on selected value in another drop-down
Hi,
I have two drop-downs - changing value in Combo1, should cause the form to be submitted and values to be populated in Combo 2.
Approaches i tried - 1) I am using an ActionListener. I am having a valueChange method which accepts an action event. However this appraoch is not working for me. 2) I was wondering if I could use Javacsript to catch the OnChange event , the javascript function would call an appropirate method in my ActionListener. I know in Struts its straightforward, but how do i achive the same here in JSF.
Any tips would be helpful.
Thanks
PS: I already came across some threads in the forum, but could not get an answer. Also, I have a retsriction in terms of using Action LIsteners itself.Try using ValueChangeListener instead of ActionListener.
Here's a working example of a ValueChangeListener. You can customize it and use it for your application.
The JSP will look like this:
<h:selectOneMenu value="#{globalsBean.selectedFirst}"
valueChangeListener="#{globalsBean.changeList}" onchange="submit()">
<f:selectItems value="#{globalsBean.first}" />
</h:selectOneMenu>
<h:selectOneMenu value="#{globalsBean.selectedSecond}">
<f:selectItems value="#{globalsBean.second}" />
</h:selectOneMenu>The globalsBean will look like this:
public class GlobalsBean extends Bean {
ArrayList first;
ArrayList second;
String selectedFirst;
String selectedSecond;
public GlobalsBean() {
first = new ArrayList();
second = new ArrayList();
first.add(new SelectItem("1", "1"));
first.add(new SelectItem("2", "2"));
selectedFirst = "1";
selectedSecond = "";
second.add(new SelectItem("White", "White Cows"));
second.add(new SelectItem("Brown", "Brown Cows"));
second.add(new SelectItem("Green", "Green Cows?!?"));
public ArrayList getFirst() {
return first;
public ArrayList getSecond() {
return second;
public String getSelectedFirst() {
return selectedFirst;
public void setSelectedFirst(String selected) {
selectedFirst = selected;
public String getSelectedSecond() {
return selectedSecond;
public void setSelectedSecond(String selected) {
selectedSecond = selected;
public void changeList(ValueChangeEvent event) throws AbortProcessingException{
second = new ArrayList();
String newValue = (String)event.getNewValue();
setSelectedFirst(newValue);
if (newValue.equals("1")) {
second.add(new SelectItem("White", "White Cows"));
second.add(new SelectItem("Brown", "Brown Cows"));
second.add(new SelectItem("Green", "Green Cows?!?"));
} else if (newValue.equals("2")) {
second.add(new SelectItem("White/Black", "White Cows with Black spots"));
second.add(new SelectItem("Black", "Black Cows"));
setSelectedSecond("");
}Let me know how it works out for you.
CowKing -
Populate updatable drop down list based on files in the folder path
Hi,
I am a beginner in labview. I am stuggling on where to start.
Here's what I need to do.
I want to create an updatable drop down list. It can be automatic upon opening the program or manually update by clicking an update button. The drop down list will list all the filenames that are in .cvs format. These files are stored in a folder path. Insider the folder, they are stored in different subfolders, the drop box should be able to find those files inside the subfolders. Once the user select a filename from the list, the program will read the data inside that file and import into an array so I can display the data.
I have an idea on how to display the data, but I don't how to populate the drop down list based on the files in the folder, make it updatable and then import that user selected file's data into the the array.
Can anyone help me with this?
Thanks, RuthYup, ListFolder with a pattern of *.csv. Then use a property node on a combo box or ring to set the items in the drop down. Here is some free training if you are interested in learning more general LabVIEW tools.
NI Learning Center
NI Getting Started
-Hardware Basics
-LabVEW Basics
-DAQ Application Tutorials
3 Hour LabVIEW Introduction
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
Drop down required for select-options
drop down required for select-options as displayed in VT01N 'shipment type'.
Hi
Check out..this example
data: i_value TYPE vrm_values,
wa_value LIKE LINE OF i_value.
PARAMETERS : p_field TYPE dd03l-fieldname AS LISTBOX
VISIBLE LENGTH 80 OBLIGATORY.
INITIALIZATION.
*-- Populate List Box
*-- TEMKSV - Legacy Value
wa_value-key = 'TEMKSV'.
wa_value-text = 'Legacy Key'.
APPEND wa_value TO i_value.
CLEAR: wa_value.
*-- Installation
wa_value-key = 'INSTLN'.
wa_value-text = 'Installation'.
APPEND wa_value TO i_value.
CLEAR: wa_value.
Setting the selection
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_FIELD'
values = i_value.
Patil -
How to populate Second drop down based on the first drop down value
Hi Experts,
i have a HTML BSP page. with 2 drop down with SELECT and OPTION tags. i need to populate the second drop down based on the first drop down value.
i tried HTMLB script they work good as stand alone when i try to embed the HTMLB with HTML it does not work.
Please can you give me a solution only with ABAP script and HTML.
please clearly let me know on what event i should implement it. sample code is really appreciated .
With regards,
ChellaYou can have event handler for first drop down . Then populate the data for 2nd field when the event triggers on first field.
-
Want to hide the drop down based on text field value
Hi,
I want to hide some of the values in drop down based on one text field value.
I have the field called name which has the value A, B, C, D and also one drop down list which has the values 1,2,3,4,5,6. I want to hide the some of the values in drop down based on A or B or C. Let say, If it is A, drop down value should be 1,3,5. If it is B, Drop down value should be 1,2,3,4. Like this for every record.
Can you please help me out.
Thanks
RamHi Robert,
I am trying it in two different way. Please suggest which is the right one and feasible.
1) I have the drop down list which has all the status. I am trying to hide the drop down values based on one text field value for all records.
2) I have collected all the drop down values into table in webdynpro method. Rightnow I have two tables.
one has line items details and another one have drop down values. both tables having common fields.
I have to show second table values for that particular key, move all of them to drop down.
Which is the best and feasible option.
Thanks
Ram -
Need a drop down for a selection screen
HI all,
I need a drop down for a selection screen.
say for eg: Field is MARA-MTART (Material Type). The selection is optional and the dropdown should be using check table: T134
How to get a dropdown? I think a function module is used , but I dont remember the name.
Kindly reply.
Thanks in advance.
Points will be rewardedHi,
chk the below code...
TYPE-POOLS: vrm.
PARAMETER: pr_spart TYPE spart AS LISTBOX VISIBLE LENGTH 7.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_spart.
INITIALIZATION.
*----Code for Drop down list....
DATA: lit_spart_list TYPE vrm_values, "Table for list of Divisions
lwa_spart_list TYPE vrm_value,
lw_name TYPE vrm_id. "Name of parameter with list-box.
*---Assign selected values to table that would be passed to FM VRM_SET_VALUES
CLEAR : lwa_spart_list,
lw_name.
*---Pass required values for list-box display.
lwa_spart_list-key = 'H'.
lwa_spart_list-text = 'HL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'S'.
lwa_spart_list-text = 'SL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'P'.
lwa_spart_list-text = 'PP'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'F'.
lwa_spart_list-text = 'FR'.
APPEND lwa_spart_list TO lit_spart_list.
*Name of parameter to which list is to be assigned
lw_name = 'PR_SPART'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lw_name
values = lit_spart_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Reagrds,
nagaraj -
This occurs on any website with active menu drop-downs. I am able to select the 1st drop-down, but must then load the page and do the next drop-down. I used to be able to make every selection at once and then reload the page to reflect all of those options.
I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.
-
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,
NehalHi 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 -
How to select drop down based on country selected in one field
Dear Experts,
I am facing a problem,
I have a table in webdynpro, where there are two columns namely Country and its Subtype.
here both the fields are drop down by key type.
when i am selecting Country field from drop down. I am getting its subtype correctly populated in other column.
But when i am selecting the country in next row, It is removing the subtype text of 1st row and giving its code.
Also Now In Column Subtype, It is Showing the dropdown related to the current selected country.
Kindly help.
Regards
SushilHi Sushil,
I guess the value for subtype is depending on the country value, which is fetch from the static value( Usually lead selected value). To avoid this we can either set the current row as lead selected row before populating subtype value or with the following code which will give the element value for the row which is selected rather than the lead selected row and then pass the value for fetching country type.
data: lr_element type ref to if_wd_context_element.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ). " Wdevent is the paramter in the "event handler
Regards,
Harsha -
Need cascading drop downs based on non hierarchial attributes
Post Author: Out of the box thinking
CA Forum: WebIntelligence Reporting
Using BO XI Web Intelligence. I am trying to create multiple dropdowns to dictate the data input for a report. The drop downs should include attribute values for products. (EG: Color, Size, Flavor, Brand etc) these attributes do not follow a structured hierarchy and does not have a parent to child relationship. I am trying to dictate the values that should be shown in all dropdowns based on the value selected in any drop down. For example, if the user selects "Red" from the "color" drop down, Brand dropdown content should only include those brands that have "Red" products. Similarly, "Flavor" dropdown should only show the flavors that has "Red" products. These dropdowns should not be in the report body. They should be in the left hand user control menu.
Is this something already available? If not, any work arounds?
I appreciate any inputs.Hi,
First of all: if I understand you correctly, you do want your checkbox value to be available within the view object. If so, you need to make it a transient attribute of your VO and your checkbox must be databound to that attribute (you were talking about a non-databound item). Whether the item relates to anything in the database is irrelevant from a JHeadstart point of view.
Your second question is actually an ADF related question, it has nothing to do with JHeadstart. In general I would say that you either update View Object attributes immediately when the flag is changed, or you do it in the Entity itself at Commit-time. What you are suggesting seems like an area for architectural improvement.
Regards
Evert-Jan de Bruin
JHeadstart Team -
How can you change a drop down menu's selection in a case statement?
Hi,
I am trying to an array finding vi. This VI will take an existing xml file and after the user has selected his/her equipment, input, output, and frequency it will put all of those options into a string and search the xml file for that exact array name and display it on an output screen. The problem I am having is that my input and outputs selection needs to be a little different depending upon the equipment selected. I thought that I could use a case statement to change the input and output selectable options, but I have run into many snags with it. For one everytime I place a new Input and Output drop down menu in the case statement it wants to place a new one in the front panel (I only want one input and output not three I have two inputs and outputs hidden right now). I believe I am using the case statement wrong... Can anyone help change my input and output selectable options depending upon the equipment selected. Attached is my xml file, Array Find.vi (the original one), and Array Find_Test.vi (this is the one I am trying to modify).
Thanks,
dlovell
Solved!
Go to Solution.
Attachments:
Find Array.zip 126 KBHi dlovell,
There are 2 key things I'd recommend for the code - using property nodes to edit the strings in the combo boxes. Something like the following snippet:
Also, check your CPU in task manager when running the code. It will eat a whole core of your machine (25% quad core, 50% dual, 100% single) - that is because you are running the while loop and polling the control as fast as Windows will allow you to. Using Event Structures is a much more efficient way of working in this example.
Check out the MOD attached
Regards,
Peter D
Attachments:
MOD_Find Array.vi 28 KB -
Drop down in the selection for the field from the table
Hi.
i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
please tell me how to use the function module and what could be the line of codes.
the drop down is for the select option on the slection screen of the classical report.
please help .HI,
Check below code..it may help you.
REPORT Zbunu .
TYPES :BEGIN OF STR ,
MATNR TYPE MATNR ,
END OF STR .
DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
VAR TYPE MARA-MATNR .
PARAMETERS : S_MATNR TYPE MATNR ,
P_MATNR TYPE MATNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
SELECT MATNR FROM MARA INTO
CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MATNR'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_MATNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'X'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = ITAB
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Ansumesh -
Updating drop down menu depending on another drop down menu
Hi!
I'm making this questionnaire, and it has 10 questions (q01 to q10).
Each question has 4 sub-questions with an associated drop-down menu (q01L1 to q01L4, q02L1 to q02L4, etc.).
The values available to select from the drop-down menu are: 1, 2, 3, and 4.
For each sub-question, the user has to select a value (1, 2, 3, or 4), and that value can only be selected once for each question as a whole.
I suppose that JavaScript will be able to remove, update, or rebuild the other drop-down menus according to the answer given to each sub-question. How can it be achieved? I have no idea how to make that happen. Could you help?
Thanks.
For example :
This is what the user actually see BEFORE filling the question :
Question 1 : When disagreeing on points of view, I get influenced by
[Drop-down menu 1] : The tone/volume of voice of the person with whom I speak.
[Drop-down menu 2] : My capability or incapability to understand the point of view of the person with whom I speak.
[Drop-down menu 3] : The logic and the rationale on which the person with whom I speak bases his/her opinion.
[Drop-down menu 4] : Whether or not the person with whom I speak is sensible to what I may feel.
The following is for you to visualise the way I named the fields in the PDF questionnaire :
q01 : When disagreeing on points of view, I get influenced by
q01L1 {1,2,3,4} : The tone/volume of voice of the person with whom I speak.
q01L2 {1,2,3,4} : My capability or incapability to understand the point of view of the person with whom I speak.
q01L3 {1,2,3,4} : The logic and the rationale on which the person with whom I speak bases his/her opinion.
q01L3 {1,2,3,4} : Whether or not the person with whom I speak is sensible to what I may feel.
q01 = the name I gave to the question 1
L1 = the name I gave to the sub-question 1
q01L1 = the name I gave to the drop-drop menu of the sub-question 1 of the question 1
{1,2,3,4} = the answers the user can select from the menu.
The user can answer :
4 : The tone/volume of voice of the person with whom I speak.
2 : My capability or incapability to understand the point of view of the person with whom I speak.
1 : The logic and the rationale on which the person with whom I speak bases his/her opinion.
3 : Whether or not the person with whom I speak is sensible to what I may feel
But cannot answer :
4 : The tone/volume of voice of the person with whom I speak.
2 : My capability or incapability to understand the point of view of the person with whom I speak.
1 : The logic and the rationale on which the person with whom I speak bases his/her opinion.
4 : Whether or not the person with whom I speak is sensible to what I may feel
This is where the JavaScript comes into play. What can be done to remove, update, or rebuild the other drop-down menus according to the answer given to each sub-question?
If the user answers 4 to q01L1, the 3 other drop-down menus should look like this
4 : The tone/volume of voice of the person with whom I speak.
q01L2 {1,2,3} : My capability or incapability to understand the point of view of the person with whom I speak.
q01L3 {1,2,3} : The logic and the rationale on which the person with whom I speak bases his/her opinion.
q01L3 {1,2,3} : Whether or not the person with whom I speak is sensible to what I may feel.
And then, if the user answers 2 to q01L2, the 2 last drop-down menus should look like this
4 : The tone/volume of voice of the person with whom I speak.
2 : My capability or incapability to understand the point of view of the person with whom I speak.
q01L3 {1,3} : The logic and the rationale on which the person with whom I speak bases his/her opinion.
q01L3 {1,3} : Whether or not the person with whom I speak is sensible to what I may feel.
And so on.
Message was edited by: einsteinbqatI'm sure that question is an FAQ in whatever language you're asking about. But you should really find the forum for that language. This is the forum for Java programming and that ain't Java.
Maybe you are looking for
-
Interface Mapping not supported in the JPA specification?
Are there any plans to add Interface support in the JPA specification? It is not supported by JPA annotations, which seems quite disruptive to proper object oriented design. However, individual implementations of JPA seem to support this: http://docs
-
10.5.3 broke my bluetooth
I just updated my 17" powerbook G4 to 10.5.3, and upon booting my bluetooth icon on the menu has a jaggen line through it and the pulldown menu for it says "Bluetooth: Not Available." Under the bluetooth area of the System Profiler, it just says "No
-
Hi , 137/234 Tob 13% Che 98.5F Crt 10*6 Rad How could i Update the above data in a field to get values as below 137/234 13% 98.5F 10*6 Thanks for the help
-
What discs were included with my iBook G4 (Nov 2004, 1.2GHz)
Does anybody have a list of which discs were included with the iBook G4 (1.2Ghz) that I bought in approx November 2004? I know there are two 10.3 System Discs, but I don't know if a separate iLife disc was included (rather than just the apps being in
-
Error using "Rotate View Tool" and warning on load Photoshop CS4
on load Photoshop send warning: "Photoshop has encountered a problem with the display driver, and has temporarily disabled GPU enhancements. Check the video card manufacturer's website for the latest software. GPU enhancements can be enabled in the P