You are viewing limited content. For full access, please sign in.

Question

Question

Stored Procedure with Autopopulated Dropdown as input

asked on July 2, 2014

 Hello everyone,

 

I was trying to create a stored procedure that does a very basic function. I want it to populate a dropdown field and then use the selected value from that field to find all the rows  that have that column. The reason that I have to use a stored procedure is that the database holds values that are not current as well as those that are current. It has a control bit column that you can give the status of that row for. 

 

Basically, if we have three columns in the table, i need all the options for Column 2 to be in my second dropdown, based on the input of the first dropdown and the 3rd column having a '1' in it to indicate it is relevant information.

 

Can someone please help me figure out what to do to get my stored procedure to populate the first dropdown so that the second dropdown can be selected? 

 

Thanks for the help

0 0

Answer

SELECTED ANSWER
replied on July 3, 2014

Ended up realizing a View might work better. Took a minute to get it set up and now it works great.

0 0

Replies

replied on July 3, 2014

Anyone able to help with this?

 

Again, to try and make it simple to understand, I just want the same type of lookup functionality you normally see when I make one column match the first value, and then fills the second field with the value(s) for that column. The only added step is that the row(s) returned after being given the first field value also has to have a "1" in a column that only is a bit data type.

 

I am trying to use two dropdowns and I cannot get the first dropdown to fill with the values from the first column so that I can select it and perform the search.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.