Passing Contour form data to stored procedure in Umbraco 7.0.3
Hi,
I am using Umbraco 7.0.3.
I'm trying to figure out the simplest way to pass form data from Umbraco Contour to a stored procedure. I'm using SqlProvider with a SQL Server Enterprise 2012 database to manage membership. The ASP.NET SqlMembershipProvider documentation specifies that all database accesses are performed through stored procedures. I would like to collect user information from a form created with Contour and pass this information into a stored procedure on the database.
Should I just create a new form with the appropriate values and create a workflow step to pass the values into the stored procedure? If so, then how do I select the Contour-created form fields from the workflow step?
If there's a best practice for performing this task, I would appreciate some guidance on where to look.
What I'm aiming to do is populate pre-value sources dynamically by executing stored procedures with a bit of reflection. (I want to grab the dataset returned by the stored procedure and use the values to generate fields with Contour.) Thank you for your comments and for providing some of the resources from Contour Contrib. Thank you for also posting the useful link on extending Contour with the workflow. I was able to find some useful resources from the Code Garden video archive, Code Garden, such as this one: The Contour Show. Further research indicates that I may need to create a custom data type. Any thoughts on how to go about this?
So you have an existing db table with some data and you want to use that data as prevalue source for contour form field? You want to get that data using a stored procedure? If so then you can create a prevalue source set it to database and then fill in db details and add either table or a view which uses the stored procedure.
Passing Contour form data to stored procedure in Umbraco 7.0.3
Hi,
I am using Umbraco 7.0.3.
I'm trying to figure out the simplest way to pass form data from Umbraco Contour to a stored procedure. I'm using SqlProvider with a SQL Server Enterprise 2012 database to manage membership. The ASP.NET SqlMembershipProvider documentation specifies that all database accesses are performed through stored procedures. I would like to collect user information from a form created with Contour and pass this information into a stored procedure on the database.
Should I just create a new form with the appropriate values and create a workflow step to pass the values into the stored procedure? If so, then how do I select the Contour-created form fields from the workflow step?
If there's a best practice for performing this task, I would appreciate some guidance on where to look.
Thanks,
Devin
Devin,
Create workflow step you can get some sample code at http://contourcontrib.codeplex.com/ and http://contourcontrib.codeplex.com/SourceControl/latest#Contour.Contrib/Contour.Contrib/WorkflowTypes/NoSpam.cs for worfklow examples so loop through record.RecordFields and then get values for each field and pass into your sproc as you are using 7.0.3 you could also for the db access use peta poco which is what umbraco uses for db access provided your db table is in umbraco db.
Regards
Ismail
Devin,
Even better from Mr Contour himself Tim Geyssens http://www.nibble.be/?p=424
Regards
Ismail
Ismail,
What I'm aiming to do is populate pre-value sources dynamically by executing stored procedures with a bit of reflection. (I want to grab the dataset returned by the stored procedure and use the values to generate fields with Contour.) Thank you for your comments and for providing some of the resources from Contour Contrib. Thank you for also posting the useful link on extending Contour with the workflow. I was able to find some useful resources from the Code Garden video archive, Code Garden, such as this one: The Contour Show. Further research indicates that I may need to create a custom data type. Any thoughts on how to go about this?
Thanks,
Devin
Devin,
So you have an existing db table with some data and you want to use that data as prevalue source for contour form field? You want to get that data using a stored procedure? If so then you can create a prevalue source set it to database and then fill in db details and add either table or a view which uses the stored procedure.
Regards
Ismail
Ismail,
That gives me a good starting point.
Devin
is working on a reply...