Disable fields based on value selected from first list box.
Hi All,
I am facing a problem in module pool programing. My scenario is there will be around 50 fields in the screen , within that first field is a drop down list box. In the list box there will be electricuty , gas and csw. If user select gas then the fields corresponding to gas will only be editable other fields not relevent to gas will be non editable(Disable).... Same case for electriciy andcsw also.
Can any one guide me regarding this....
Thanks in advance.
Regards
Ajoy
Hi Asaha,
This link will be of great help for you if you are new to Module pool.
[Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]
For [DYNP_VALUES_READ|http://wiki.sdn.sap.com/wiki/display/ABAP/FilteringF4HelpvaluesinTablecontrol,basedonotherfield+value] refer this link.
For [DYNP_VALUE_UPDATE|http://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield]
Regards
Abhii
Similar Messages
-
Link an image field to a value selected from a list
Hello!
I'm newbie to Dreamweaver - PHP and I have a problem. I have
made a list that displays the names of all the images of my
database. Now, I want every time the user selects a value from the
list the corresponding image appears on the same page. How can I do
this?
Please help me!!!Hi Stefan,<br /><br />Thanks for responding to my last mail. I am talking about the XFA(xml form architecture). Actuallly i am working on Picture form field in PDF which Adobe has newly introduced. In this type of form field , user can add an image. But i am not able to differentiate between the "Picture form field" and "push button". The only thing i have found that the picture form field entry exist in dataset but not the Push button.<br /><br />29 0 obj<br /><<<br />/Length 13533<br />>><br />stream<br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><IMAGE href="" xfa:contentType="image/jpg"></IMAGE></form1></xfa:data></xfa:datasets><br />endstream<br />endobj<br /><br />In the above case the "Image" is a picture form field.<br /><br />Another difference i found between "push Button" and "Picture Form Field" is the MK dictionary as below.<br /><br />Pushbutton<br />-----------<br />/MK <<<br />/BG [ 0.831375 0.815689 0.784317 ]<br />/CA (Print Form)<br />/BC [ 0 0 0 ]<br />>><br /><br />Picture form Field<br />-------------------<br />/MK <<<br />/TP 1<br />/I 17 0 R<br />>><br /><br />But i want to find the exact difference. May be some bit in Form Field Flag(ff) signify the picture form field. It will be very helpful to me if you could tell me the exact difference.<br /><br />Kind Regards,<br />Shekhar Kumar Keshri
-
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. -
Counting the number of values selected in a list box
I'm trying to add a counter to a form that tells the user how many values have been selected from a list box... I tried adding a FormCalc formula to a calculate event in the "counter" field as follows:
count(form1.#subform[0].ListBox1.rawValue)
But for some reason it's not adding them up. It only gives me a value of 0 when none are selected, or 1 where any number of selections are made.
Can anyone help me out?
Thanks in advanceTry putting this in the calculate event of your counter field:
var num=0;
for (var a=0;a<ListBox1.items.nodes.length;a++){
if (ListBox1.getItemState(a))
num++;
this.rawValue=num;
Exit the list box and the field will calculate.
Kyle -
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 -
Populate 2nd combo box based on value selected in 1st combo box
I am still using Acrobat 6 though I may be upgrading soon to Acrobat 8. I have a form with two combo boxes, the first "state" has values of MN and WI. Based on which value the user picks I would like to populate a "county" combo box with lists of counties that we deal with.
Thanks,
GeneOne can set the option and export value using an arry:<br /><br />// document level script<br />// Master List of Lists <br />// Each entry in this object listeral is the name of a State <br />//Manually enter the State Names into the state field combo box <br />// The associated value is the item list, where each item is a name value pair, [<County> and [county code, zip code]] <br /><br />// state: ["county name", ["county code", "zip code"]]<br />var oStateNames = {MN: [["-", ["", ""] ], <br /> ["St. Louis", ["MNStl", "55001"] ], <br /> ["Carlton", ["MNSCrl", "55002"] ], <br /> ["Pine", ["MNPin", "55003"] ],<br /> ["Cook", ["MNCok", "55004"] ] <br /> ], <br /> WI: [["-", [" ", " "] ],<br /> ["Douglas", ["WIDou", "55005"] ] ,<br /> ["Bayfield", ["WIBay", "55006"] ],<br /> ["Burnette", ["WIBur", "55007"] ],<br /> ["Ashland", ["WIAsh", "55008"] ]<br /> ]<br /> }; <br /><br />//SetCountyEntries() on keystroke entry in state field <br />function SetCountyEntries() <br />{ <br /> if(event.willCommit) <br /> { <br /> // Get the new counties list from the Master List <br /> // Since the selection is being committed, <br /> // event.value contains the State name <br /> var lst = oStateNames[event.value]; <br /> // Clear the county list if there are no counties for the selected state <br /> this.getField("ee.address.county").clearItems();<br /> this.resetForm(["ee.address.code", "ee.address.zip"]);<br /> if( (lst != null) && (lst.length > 0) )<br /> this.getField("ee.address.county").setItems(lst); // set opiton and export value<br /> } <br />} <br />// end document level script<br /><br />For the combo box "ee.address.county" one can create an array from the export value to populate the county code and zip code<br /><br />// custom keystroke for county combo box<br />if(event.willCommit & event.value != "") {<br />// split county and zip codes<br />var aCodes = this.getField(event.target.name).value.split(",");<br />this.getField("ee.address.code").value = aCodes[0];<br />this.getField("ee.address.zip").value = aCodes[1];<br />}<br />// end custom key stroke code
-
Populating 2nd DropDown Box according to value selected in first DD box ??
Hi,
In our PCR Adobe forms we have two dropdown boxes, and our requirement is that if user selects a value in first dropdown box, second dropdown box should be populated according to the selected value.Hi,
I had a similar requirement in my previous client site like based on the Personnel Area selected, I used to get the list of Personnel Sub Area.
For this, I had triggered an EVENT say PERSG on Exit Event of Personnel Sub Area field in Adobe form.
This event is handled in QISR1 BADI - SCENARIO_PROCESS_USER_COMMAND as...
<i> if user_command = 'PERSG'.
READ TABLE SPECIAL_DATA INTO LS_SPECIAL_DATA WITH KEY FIELDNAME = 'EG_NEW'.
IF SY-SUBRC = 0.
MOVE LS_SPECIAL_DATA-FIELDVALUE TO W_PERSG.
SELECT * FROM T503 INTO CORRESPONDING FIELDS OF TABLE ESG_TAB
WHERE PERSG = W_PERSG.
CLEAR INDEX.
LOOP AT ESG_TAB INTO WA_ESG_TAB.
CLEAR W_PTEXT.
SELECT SINGLE PTEXT INTO W_PTEXT FROM T503T
WHERE PERSK = WA_ESG_TAB-PERSK.
ADD 1 TO INDEX.
CLEAR LS_ADDITIONAL_DATA.
LS_ADDITIONAL_DATA-FIELDINDEX = INDEX.
LS_ADDITIONAL_DATA-FIELDNAME = 'ESG_NEW_KEY'.
LS_ADDITIONAL_DATA-FIELDVALUE = WA_ESG_TAB-PERSK.
APPEND LS_ADDITIONAL_DATA TO ADDITIONAL_DATA.
CLEAR LS_ADDITIONAL_DATA.
LS_ADDITIONAL_DATA-FIELDINDEX = INDEX.
LS_ADDITIONAL_DATA-FIELDNAME = 'ESG_NEW_LABEL'.
CONCATENATE W_PTEXT '(' WA_ESG_TAB-PERSK ')'
INTO LS_ADDITIONAL_DATA-FIELDVALUE.
APPEND LS_ADDITIONAL_DATA TO ADDITIONAL_DATA.
ENDLOOP.
ENDIF.
ENDIF.</i>
I hope this clears your problem.
Regards,
<i><b>Raja Sekhar</b></i> -
Query based on a selection from a combo box
Hi,
i have a search.jsp form with some input fields. One of the input fields is a combo box, filled with information from a database. Now I want to query the database with the option selected in the combo.
This is the code of the combo box:
<select name="ScopeCh">
<option selected value "-1">Select ...</option>
<% while (searchForm2.getScopes() > 0 ) { %>
<option value="<%=searchForm2.getScope()%>">
<%=searchForm2.getScope()%>
<% } %>
</select>
The query doesn't work when I select a value in the combo box.
Thanks for your helprequest.getParameter(ScopeCh)
Should return the Value which was selected from Combo Box -
Multi Selection from a List Box to a Text Box
So I want to be able to make Multi Selections within List box and export it to the Text box. Right now I have a Script running on the cal of the Text Box
event.value = getField("LISTBOX").valueAsString;
Which is able to do one selection but I cant find anybody that can grab two selecitons and put into a text box with commas for something. Is there a way to do this?
-ZachWow over my head a little. I understand what an array is with script but not how to write the script to handle it. I made this:
event.value = getField("LISTBOX").value;
But still no change in the behavior with multi selections. Example below if you want to check it out.
https://dl.dropboxusercontent.com/u/2944617/formtext2.pdf -
How to disable field based on the selected value
Hi everyone,
I have "employee" table,
it contains the following field,
emp_name
emp_designation
Category
YearsHere the "category" is the select list value which has the following values in select list,
Fresher
Experienced,
when the value :Fresher" is selected for "category" then the "Years" field should be disabled.
I tried the following dynamic action ,
Name:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:Fresher
Fire When Event Result Is:TRUE
selection type:P1_YEARBut it doesnt work.
can anyone give alternate solution?
Thank you.
Regards,
gurujothiName:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:FresherTry return value instead of this display value(Fresher) of select list
Fire When Event Result Is:TRUE
selection type:P1_YEARIn your above dynamic action, where is the disable action? -
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 -
I have a scenario where it has multiple parameters like.....
Period which consists of "Year,Quarter,Month" as a values.
When user selects "Year" value in "Period" Parameter then "FromMonth" has to set its default value as 36th month from now.
Example: If user selects "Year" then "FromMonth" has to show "April-11".
When user selects "Year" value in "Period" Parameter then "EndMonth" has to set its default value as current month.
Example: If user selects "Year" then "FromMonth" has to show "March-14".
If user selects "Month" Value in "Period" Parameter then it has to allow user to select the Month Range and again if user selects "Year" value in "Period" Parameter then StartMonth has to show 36th month from now and
End Month has to show current month.
Please help me how to resolve this issue.
Thanks in Advance.Hi Vasu_479,
First, you need to create a dataset to set the StartDate and EndDate parameter's value using the query provided by Visakh. And then use the StartDate and EndDate parameter to filter the data in MDX query. Here is a sample query for your reference.
select
{[Measures].[Internet Sales Amount]
} on columns,
{[Date].[Date].members} on rows
from(
select
STRTOMEMBER("[Date].[Date].&["+@StartDate+"]"):STRTOMEMBER("[Date].[Date].&["+@EndDate+"]")
) on columns
from [Adventure Works]
Hope this helps.
Regards,
Charlie Liao
TechNet Community Support -
How do I use Javascript to populate a text field based on a selection from a drop down box?
Greetings,
I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form. I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections. When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection. I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
For example, if the user selected "Hospital 1", the text field would display:
123 Main St
Anytown, CA 12345
Any help or examples you can provide would be greatly appreciated.You have the element names within the object within brackets.
Make sure your brackets are properly placed and matched.
// Place all pre-population data into a single data structure
var Location = {
"--Hospital--":{ line1: " ", line2: " " },
"Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
"CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" },
"CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" },
"CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" },
"CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
"Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
"Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
// some debugging code to see location names;
console.show();console.clear():
for(I in Location) {
console.println(I);
// end debugging code;
function SetFieldValues(Hospital_Name) {
this.getField("AddLine1").value = Location[Hospital_Name].line1;
this.getField("AddLine2").value = Location[Hospital_Name].line2;
This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
Are you sure you have all the field names correctly spelled and capitalized?
Do you get any error in the JavaScript console?
Just trying the line that defines the "Location", I get the following error:
SyntaxError: invalid property id
1:Console:Exec
undefined
All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
It might help to have a link to the problem form.
Make sure your brackets are properly placed and matched.
// Place all pre-population data into a single data structure
var Location = {
"--Hospital--":{ line1: " ", line2: " " },
"Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
"CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" },
"CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" },
"CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" },
"CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
"Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
"Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
function SetFieldValues(Hospital_Name) {
this.getField("AddLine1").value = Location[Hospital_Name].line1;
this.getField("AddLine2").value = Location[Hospital_Name].line2; -
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 set a value based on value selected from LOV
Apex 4.2
I'm having trouble creating a dynamic action to set a value. I've used dynamic actions to hide and show regions but for some reason cannot set a value.
I have a select list --> P101_LIST. Source Type is 'Database Column'. Source value or expression is 'person_id' The query is as follows:
Select first_name, person_id
From Persons
I have a display value --> P101_DISPLAY. Source Type is 'Static Assignment'. Source value or expression I left blank.
I would like for every time the user selects a name from P101_LIST, the P101_DISPLAY item gets updated to show the corresponding value(person_id).
Because there are other page items / information on the page, I would prefer this to not submit / update the page. Wouldn't want other page items / information getting updated.
Any help on this matter would be greatly appreciated. Thanks in advance.Hi,
Create a DA:
- event onChange P101_LIST
- Action: PL/SQL
- PL/SQL code:
:P101_DISPLAY := :P101_LIST;
Items to submit: P101_LIST
Item to return: P101_DISPLAY
And done.
Regards,
Joni
Maybe you are looking for
-
Gnome AND KDE won't start (i686 and 64bit)
http://bbs.archlinux.org/viewtopic.php?id=71991 I've had a rough time these past few days and I posted earlier on Arch64 forums thinking it was just architecture thing but as it turns out after my reinstallation of Arch to 64 bit again (First i686, t
-
While intending to perform a clean install of Mountain Lion while continuing with old apps and files, is it a waste to restore a backup that was made while running Mountain Lion as an UPgrade from Lion? Originally I was running Mountain Lion as an UP
-
SP2013 - Date Filter Web Part looses connection when used in a site template
Hi, I created two table reports in SQL Reporting Services 2012 and inserted in a web page using the Reporting Service Report viewer in SharePoint 2013 with CU Dez 2013. The two reports require two dates and I use two date filter web parts (I did not
-
How to recover the Outlook password?
I have just started a new job, and am on my own in an office (no IT support). I am using Outlook 2007, but we can't recieve any emails. The pst file is almost 3GB so i have made another one and am trying to clear old stuff from the old one to the ne
-
Since yesterday (07-may-2014) when I start any web application, even new created ones, without any code added by myself from the VS development environment (Vb.net or C#) I get the next error. IIS Express starts, the IE browser appears with the messa