Dynamically filter a stored procedure - InfoPath Dev
in

InfoPath Dev

Dynamically filter a stored procedure

Last post 10-20-2011 05:47 AM by jaxkookie. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-19-2011 08:39 AM

    Dynamically filter a stored procedure

    I am using a SQL db for my data source. I have several stored procedures to populate my dropdowns. My first ddl is for regions, and it works perfectly. no filter and it pulls down all the regions to populate the field. I want to use the value of this field to filter my next stored procedure. But I can't get it to work. If I hard code the region value in my exec statement, it filters perfectly.

    EXEC Get_CPMSupportData_VendorbyRegion 'Southeast' 

     Maybe I am missing the correct syntax.

    I tried this:

    EXEC Get_CPMSupportData_VendorbyRegion @Region

    EXEC Get_CPMSupportData_VendorbyRegion /my:Region.value

    but neither one works. Any help or suggestion would be greatly appreciated.

    Kind regards,
    Larry
  • 10-19-2011 10:27 PM In reply to

    Re: Dynamically filter a stored procedure

    Hello JaxKookie,

    I don't believe InfoPath has a built-in way to dynamically include form field values in stored procedure queries.  It is something people are often looking to do, and that's why we added the ExecuteSqlQuery command to qRules.  I recommend having a look.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-20-2011 05:47 AM In reply to

    Re: Dynamically filter a stored procedure

    Thanks Jimmy,

    I kinda figured that by the end of the day yesterday. What about filtering the results. I am tring to build cascading dropdowns from an SQL data source. If I cant add form field values in my stored procedure, is there a way to add a rule to filter the returned results, just like you would on other secondary data sources?

    Kind regards,
    Larry
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.