Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Devin Bost 37 posts 78 karma points c-trib
    Mar 04, 2014 @ 02:04
    Devin Bost
    0

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 04, 2014 @ 10:29
    Ismail Mayat
    100

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 04, 2014 @ 10:33
    Ismail Mayat
    0

    Devin,

    Even better from Mr Contour himself Tim Geyssens http://www.nibble.be/?p=424

    Regards

    Ismail

  • Devin Bost 37 posts 78 karma points c-trib
    Mar 05, 2014 @ 13:15
    Devin Bost
    0

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 05, 2014 @ 13:30
    Ismail Mayat
    0

    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

  • Devin Bost 37 posts 78 karma points c-trib
    Mar 05, 2014 @ 13:48
    Devin Bost
    0

    Ismail,

    That gives me a good starting point.

    Devin

Please Sign in or register to post replies

Write your reply to:

Draft