cancel
Showing results for 
Search instead for 
Did you mean: 

Want to hide the drop down based on text field value

Former Member
0 Kudos

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

Ram

Accepted Solutions (0)

Answers (5)

Answers (5)

OttoGold
Active Contributor
0 Kudos

You get some points even for awarding points from your side to any other user. Because you don´t have a single point then (a) you have never helped a living soul (b) you have never awarded points for the help you get here.

That means you won´t get any more help from my side. And I will add this comment to all your threads to warn other community members. Think about it. Fix it. Or you´re not welcomed here. Otto

Former Member
0 Kudos

Resolved by own

OttoGold
Active Contributor
0 Kudos

Dear Ramesh, you want everybody to explain, but you´re not going to think at least a little for yourself right? Like you didn´t in your last 193 posts and gave back nothing (0 points) to the community. Otto

Former Member
0 Kudos

Hi Otto,

I had answered for some of the queries. I am not sure about the point. Sure I will do it.

Thanks

Ram

Former Member
0 Kudos

Resolved by own

OttoGold
Active Contributor
0 Kudos

You can use a blank drop down, write a function which has an input parameter, based on the value of the param you will dnyamically populate the drop down. No values will be copied, deleted or anything. You will have the whole list hardcoded in the script and based on the conditions you will put items into the DD or not.

Otto

Former Member
0 Kudos

So the drop down list is always blank for all items. We have to write the logic in script. Thatswhat you are saying right.

Each line item they should know the what is the status they are in currently. based on that value we populated in drop down they will move to next status.

And also I cannot hardcode the drop down values. They may add some of the status in future. In that case, they have to change the script again which we dont want.

Please help me out.

Thanks

Ram

Former Member
0 Kudos

Hi Otto,

can you please explain me your scenario?/

Thanks

Ram

chintan_virani
Active Contributor
0 Kudos

Why don't you use 2 dependent dropdowns instead of trying to use a TextField and a dropdown.

Former Member
0 Kudos

Hi Chintan,

I have 60 line items. Each and every line item I have change the values in the drop down based on that particular text field values. So I cannot use text field values in another drop down.

Thanks

Ram

Former Member
0 Kudos

we have a dynamic table with 50 - 60 lines. Depending on which business unit is chosen from a dropdown field, we have to display a set of 10 rows and hide the other 40 - 50.

it's a pain to code, but it can be done.

Former Member
0 Kudos

Hi Robert,

yeah. Can you please explain how did you do achieve that?.

Thanks

Ram

Former Member
0 Kudos

Hi 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

Former Member
0 Kudos

Hi Robert,

Can you please explain me, how to link two drop down list. I am trying that option now.

Thanks for your help

Ram

Former Member
0 Kudos

Hi Chintan,

Can you please explain how to do with two drop down list?.

Thanks

Ram

Former Member
0 Kudos

Hi Robert,

I wrote the logic to add the values in drop down list based on text field. I set the alert box on the condition. So everytime it is getting triggered, but apart from the first record it is not getting added to the drop down list. Can you please help me out.

Thanks

Ram

Former Member
0 Kudos

I think what's happening is that you're on a different row, but your code isn't specifying which dropdown to update.

I'm not really well educated on how to do that. But it seems that you need to specify the row index when you are populating your dropdown.

Former Member
0 Kudos

I set the message alert box. I am getting corresponding values for the other records. I am adding the values to drop down list every instance so it should added to the drop down list. How to find the index of the coresponding row..Using length?.

Thanks

Ram