Populating a drop-down column in a table using a connection

Home Forum General Populating a drop-down column in a table using a connection

This topic contains 6 replies, has 0 voices, and was last updated by  pmeidinger 8 years, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #533

    pmeidinger
    Participant

    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.png

    #5359

    tmrhymer
    Participant

    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?

    #5360

    pmeidinger
    Participant

    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.png

    #5361

    tmrhymer
    Participant

    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.

    #5363

    pmeidinger
    Participant

    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.

    #5368

    tmrhymer
    Participant

    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.

    #5369

    pmeidinger
    Participant

    Never thought of that option; I’ll keep it in mind. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!