GetProfilebyUserName appears correct in form preview but not after published - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

GetProfilebyUserName appears correct in form preview but not after published

Last post 03-07-2019 08:01 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-27-2019 10:22 PM

    GetProfilebyUserName appears correct in form preview but not after published

    I've set up a data connection to get the users's email address with a formload rule. Rule is to query using the GetProfilebyUserName data connection Set value of StrCurrentUser to UserName Set value of email to value=WorkEmail. When i preview the form it works perfectly. When I save and publish the form it doesn't work. HELP. I'm losing sleep. I was getting an error 5566 (or something like that, but I managed to get my dataconnection to work and quit giving that error.) or at least I made the error go away...maybe it's not really working??
  • 03-01-2019 08:22 AM In reply to

    Re: GetProfilebyUserName appears correct in form preview but not after published

    Sometimes profile properties have a different name in the browser.... sometimes the user name needs to be slightly different. Here's how I troubleshoot. Drag the data connection query and data fields to your form, so you can see the data being returned, and so you have the option to try different values in the query field. Add a button that runs the query (so you can try different queries and see what works!), and add another button that sets the query field to the userName() function - so you can see what the result of that is. Publish the form, and then you can see what's being returned initially in the query, as well as try setting it to the userName() function (with your test button) and executing the query (with your other test button). Maybe the userName() is including claims info and you need it not to (you can substring that out, need be) but at least this way you can see what's happening. :)
    Hilary Stoupa

  • 03-06-2019 07:10 AM In reply to

    Re: GetProfilebyUserName appears correct in form preview but not after published

     I had difficulties myself with this when I first started creating forms. Found this tutorial and it helped tremendously: https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-1-of-3/

    I agree with what Hilary said, but also want to add is this form being filled out via web browser or InfoPath Form Filler? 

  • 03-06-2019 05:45 PM In reply to

    Re: GetProfilebyUserName appears correct in form preview but not after published

    I finally figured it out with that tutorial. I had something not right in my data connection file so even though the error had cleared it still wasn’t working right. I was pretty excited when I got it to work! Thanks for the reply!
  • 03-07-2019 08:01 AM In reply to

    Re: GetProfilebyUserName appears correct in form preview but not after published

    Good job, glad you got it straightened out. :-)
    Hilary Stoupa

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