on 08-27-2009 2:45 AM
Dear all,
I have populated one Drop Down list using Java code. Now,base on the selection of this drop down list,i need to change another field's value accordingly..how should i do that? I;ve tried various method to get the index of the current selected item in the drop down list but to no avail...can someone please shed some lights...thank you!
Hi Lee,
You can have a work around like: bind the internal table (which consists of Materials and their respective Price's) in the Adobe Form by creating a separate table in the Layout Designer and make it's pressence as hidden. As usally bind the drop down list also which consists of all the materials. Now in the exit event of the Material Drop Down loop this hidden table and get the materials price and place it in the current row where ever it is required. For this some scripting effort is required as need to loop a table and need to get the value and again place it in the current row of the existing table.
Hope this may solve your issue.
Regards
Pradeep Goli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Joan,
Any specific reason on why you want the index, because instead of that on the exit event of Drop-down write following in JavaScript.
if(ddList.rawValue = "somevalue") // insert your condition here
{
// do domething
TextField.rawValue = "Hi Joan";
}
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Joan,
Put if else conditions as per your business logic and the code I gave should work for you.
Just FYI ddList is name of my drop-down.
if(ddList.rawValue == "Mat1")
{
NumericField1.rawValue = "12.0"; // NumericField1 is name of my price field.
}
else if(ddList.rawValue == "Mat2")
{
NumericField1.rawValue = "2.0";
}
else
{
NumericField1.rawValue = "1.0";
}
Chintan
ARE YOU WORKING ON HCM FORMS OR ITS THRU WEB DYNPRO ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil ,
the next value come from database.
actually the record goes like this, it is a table , say
Mat_ num desc price
A001 book 3 .0
A002 pencil 2.5
i will have more than 20 materials. In the java wdinit, i have already populate all the mat_num into the drop down list
and these drop down list are selectable at each row in the table which resides in the Adobe form.
now for each row, when they select the mat_num, i need to display the correct price at that particular row.
any idea how can i implement this? many thanks
Hi Lee,
As far i know you need to trigger an event and for that you need a button in the form which is linked to the event. then in the method ONACTIONCLICK you need to write the code. In your case tricky part will be to decide where to put the button.
Edited by: Nikhil Poojari on Aug 27, 2009 8:55 AM
I am not sure of the index, so you mean to say when you select one material the corresponding rate should be displayed in the table. will it be possible to show the description and the rate in the drop down of material, so you wil have only one field in the table which will contain all the three fields.
even if you get the index what will you do with that ?
Edited by: Nikhil Poojari on Aug 27, 2009 9:26 AM
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.