Multiple data connection so re query data connection - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Multiple data connection so re query data connection

Last post 03-10-2020 01:54 AM by welshartnow. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-22-2020 10:07 AM

    Multiple data connection so re query data connection

    I need to query the same data source multiple times. Can I re filter the same data source multiple times or do I need to create multiple data connections of exactly the same type? Thank you for any advice on this.
  • 02-24-2020 07:48 AM In reply to

    Re: Multiple data connection so re query data connection

    It depends on how you are using the results. If you query the data connection, use rules to set some fields, and then query the data connection again with a different filter, that will work fine. If you are using it for a dropdown, however, whatever the last result set is will display (same issue with a default value).
    Hilary Stoupa

  • 02-24-2020 08:23 AM In reply to

    Re: Multiple data connection so re query data connection

    Thank you very much for your reply. Yes I have tried this and it does work, originally I was binding the fields to the data query fields and of course they kept changing as I queried the connection each time, so I cleared those bindings out and set the value of the fields within the rules. And I can query as many times as I wish . Thank you Hillary!!
  • 03-09-2020 09:59 AM In reply to

    Re: Multiple data connection so re query data connection

    Can you explain me how u did it? Wich rules I had to use? I'm confusing just a little sorry. Thanks in advance
  • 03-10-2020 01:54 AM In reply to

    Re: Multiple data connection so re query data connection

    1.  Add a new data connection GetUserProfileByName, location something like http://mysite/_vti_bin/userprofileservice.asmx?WSDL  , operation select GetUserProfileByName, untick automatically retrieve data when form is opened
    2. This data connection can be queried multiple times but you need to supply the particular account name each time you query the connection
    3. For user1 make sure you have a field storing their accountusername on your view then on this field set a rule AccountName = user1account name
    4. Now set another rule on this field which queries for data (getuserprofilebyname) based on the new account name
    5. Now add another rule on this field which picks up one of the returned fields for the particular user and allocates it to a field on your form eg Rule , User1email (field)   =  Value[Name="WorkEmail"]
    6. Then keep repeating for  each of the fields you require returned for user1
    7. Now for user2 have a field storing their particular account name and repeat the above to do the same as above--

     

    Does this make any sense? 

     

    Regards Martin 

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