Forum Replies Created
- August 4, 2010 at 7:18 pm in reply to: Using a table for data entry: use Key Is Pressed behavior to add a new row? #5388
I had thought about that, but I made the columns in the table mandatory, so the user would have to delete any empty rows anyway. But I could try removing any completely empty rows automatically when they submit the data.
Your suggestion worked. Thanks, again!
Sorry, here’s that link: imgur.com/utKoN.png. I think I get what you’re saying, though. Will give that a try. Thanks for all your help!
That worked, thank you! And yes, I am setting the current row to the first row to begin with. I have a question about that, in fact. Is there a simpler way of doing this instead of doing 1) Set Table Rows:First Row 2) Checking the columns 3) Set Table:Next Row 4) Checking the columns 5) Repeat at 3).
Here’s the screenshot of what I have. The 1 and 2 labels are the exact same validations, once for the first row and then again for the remaining rows. I wasn’t sure if there was a better way to do this.July 27, 2010 at 9:20 pm in reply to: Populating a drop-down column in a table using a connection #5369
Never thought of that option; I’ll keep it in mind. Thanks!July 23, 2010 at 9:39 pm in reply to: Populating a drop-down column in a table using a connection #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 23, 2010 at 9:03 pm in reply to: Populating a drop-down column in a table using a connection #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. //imgur.com/JMhNU.png
Support helped me figure it out. In the Return Parameters, for the Stored Procedure Parameter Name, I needed to enter RS1.[columnname] to get the data back.
For the sake of argument, let’s say my stored procedure has no input or output parameters and is just a SELECT statement:
CREATE PROCEDURE dbo.sp_GetBuildingList AS
SET NOCOUNT ON;
SELECT building, name
ORDER BY name
How do I set up the Connection Action to receive the ‘building’ and ‘name’ fields from the stored procedure? I tried adding Return Parameters (screenshot here: //i.imgur.com/ZPHZE.png) but I get an error:
Agent SQL error
Procedure sp_GetBuildingList has no parameters and arguments were supplied.
How do I get those two rields back from my stored procedure?