Populate form fields from non-repeating SQL Server data on load - InfoPath Dev
in

InfoPath Dev

Populate form fields from non-repeating SQL Server data on load

Last post 05-24-2012 10:41 AM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-23-2012 08:02 AM

    Populate form fields from non-repeating SQL Server data on load

    I've been given the task of creating a large InfoPath 2010 form which will be served by a SharePoint site and it's data will be submitted to a SQL Server database. The form needs to display some read-only information from a previous form the user has filled out; if they haven't filled it out then the fields will just be empty. I would ideally like to be able to do this without any code if possible. I've created a SQL Server data connection, selected my table and modified the SQL query to look similar to: "SELECT TOP 1 * FROM MyTable WHERE Id = 1" What I want to be able to do is replace the hardcoded Id value with a parameter that can be set from the query string and bind my non-repeating data to form fields declaritively. Is this possible or do I need to write code in the loading event which uses the InputParameters to do this? Writing the code isn't a problem as I'm a C# developer but I want to try and minimise the amount code behind in the form if possible. Thanks in advance
  • 05-24-2012 10:41 AM In reply to

    Re: Populate form fields from non-repeating SQL Server data on load

    We have some products that could help you and wouldn't require any code.

    DBXL will help you retrieve SQL queries into your InfoPath form and also submit data from an InfoPath form back into SQL: http://www.qdabra.com/en/products/DBXL.aspx

    qRules will let you retrieve input parameters easily so that you could use them in your SQL query: http://www.qdabra.com/en/products/qRules_new.aspx

    Otherwise, I think you're looking at writing some custom code as there isn't a way to do this out of the box using rules.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.