InfoPath 2007, Use the GetUserProfileByName SharePoint WebService username to feed another data connection SQL Server Query - InfoPath Dev
in

InfoPath Dev

InfoPath 2007, Use the GetUserProfileByName SharePoint WebService username to feed another data connection SQL Server Query

Last post 03-17-2012 09:39 PM by EmmaRoberts. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-02-2011 08:34 PM

    InfoPath 2007, Use the GetUserProfileByName SharePoint WebService username to feed another data connection SQL Server Query

    This seems like such a simple thing, but I guess it isn't since I've spent days tracking down "close, but no cigar" scenarios to what I need.

    Need:

    a) Use a Web Based InfoPath 2007 Form to enable a user to select only 'their' own records from my database for review when form is load, (cannot load all 70,000 records, takes too long).  

    Have:

    a) I have a working Form which is posting the Main Form data to a SharePoint Library on Submit

    b) Working Data Connection SharePoint Web Service to grab the username from the GetUserProfileByName

    c) Working Data Connection to SQL Server which has a good query (with hard coded WHERE filter to limit results during development)

    How can I pass the UserName from the Web Service automatically at form open to my Data Connection  SQL Server while keeping this a Web Usable Form? (And remove hard coded value)

    Any help would be appreciated.

    Randy

  • 12-05-2011 10:14 AM In reply to

    Re: InfoPath 2007, Use the GetUserProfileByName SharePoint WebService username to feed another data connection SQL Server Query

    Hi -

    Sorry to say - but this is not easy.

    You will either need to write custom code for this (the general idea is outlined here) and modify your SQL connection in code, use an add-on like qRules which has a command you can use to add a dynamic where clause, or use web services (build your own, or buy one - we have a great web service suite here.)

    Hilary Stoupa

  • 03-17-2012 09:39 PM In reply to

    Re: InfoPath 2007, Use the GetUserProfileByName SharePoint WebService username to feed another data connection SQL Server Query

    can you show some code? I've done this and got similar issues, you have to specify the credentials the web service is going to use.

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