Hi, does anyone know how to setup an Xmod Pro template (or form) that allows a user to:
1). edit field values directly within a list; and then
2). click an "Update" button at the bottom of list that runs a sql command over all rows in that list?
I have a sql table called 'Jobs' and a child table called 'Products'. Sending the user into edit mode for each Product row they want to update is painful. So I want them to be able to update values directly on the Product list and click Save once.
I have a sql stored procedure that gets the Product rows for a specific Job (e.g. EXEC [SelectJobProduct] @JobID = JobID) which returns a dataset like:
JobID, ProductID, Description, Cost
12, 678, Paper, 26
12, 679, Pencils, 12
12, 680, Rubber, 8
And then a sql stored procedure updates each Product row within a Job (e.g. EXEC [UpdateJobProduct] @JobID=JobID, @ProductID=ProductID, @Description=Description, @Cost=Cost)
I haven't been able to find any examples of <xmod:Template> being used like a form, or an <EditForm> being used with multiple rows. The XMP TableSorterDemo shows how to run a datacommand on a single row within a list which has been really useful, but not how to iterate an update datacommand over multiple rows (or how to use input and id fields in the list).
Any advice welcomed! Many thanks.