- July 23, 2010 at 4:44 pm #533
I have a table in my form that comprised of two text columns and a drop-down column. When a new row is added, I would like the drop-down column to be populated with a list of items from our database. I’ve created a stored procedure to get these items, but I can’t get them to show up in the drop-down.
As a test, I added a separate list object to my form and I can populate it with the items returned from my stored procedure, so I know it works. I just can get the items into the drop-down column of my tabe object. What am I missing?
A screenshot showing the drop-down column properties and the connect properties of the Row is Added behavior can be found here: http://imgur.com/hHBA6.pngJuly 23, 2010 at 4:59 pm #5359
Make sure your target column is for all rows and not the current row. Also, not sure if you have already but try testing your connection action from the connection page and make sure you get results there.
In your return parameters, in procedure parameter column, you are using the RS1.xxx prefix to specify the result set correct?July 23, 2010 at 9:03 pm #5360
Yes, as I stated in the original post, the connection action does work because I can get it to populate a separate list control in my form. I have also tested it in the Connection Action setup and it returns all the items I expect.
Changing the target column to All Rows does not work; it’s adding one row to the table for every item returned by the connection action.
I’m using the “Row is added” behavior because I want the user to add a row and have the connection action populate the drop-down column with all items that are returned.
Here’s a screenshot showing my table and a test drop-down. The drop-down column in the table, called Reason Code, is not being populated with anything but the table ended up with 28 rows in it (not what I want). The test drop-down to the left *is* being populated with the 28 items I want. http://imgur.com/JMhNU.pngJuly 23, 2010 at 9:29 pm #5361
I see your problem now, i just assumed the dropdown in a table would work the same as a dropdown outside of a table. This seems to be a lacking feature. I’m not able to accomplish what you are trying either, but I know in future forms i will need that same ability.July 23, 2010 at 9:39 pm #5363
Yes, I hope that will be added some day. I know I can hard-code the items in the drop-down based on what’s in our database, but if there are lots of items (my example is only 28) that change with some frequency then it’s a pain to constantly update the form. Pulling the latest data right out of the DB would be very handy.July 27, 2010 at 9:17 pm #5368
I was thinking about this today and got an idea for an alternate interface… Instead of making the fields editable within the table, maybe you could have a set of fields above the table and a button for adding the values to a table row. Then within each row on the table, add an edit button. When they click the edit button that would load the rows’ fields into the fields above, and maybe a save button. Yeah i know that sounds like a lot of extra overhead and yeah what really needs to happen is allowing us to dynamically populate fields in a table, but in the meantime this seemed like a good option.July 27, 2010 at 9:20 pm #5369
Never thought of that option; I’ll keep it in mind. Thanks!
You must be logged in to reply to this topic.