<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: GetUserProfileByName fires on second change to dropdown</title><link>https://www.infopathdev.com:443/forums/thread/124198.aspx</link><pubDate>Fri, 11 Jun 2021 17:00:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124198</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/124198.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=124198</wfw:commentRss><description>Great job &amp;amp; thanks for posting your solution to help others!</description></item><item><title>Re: GetUserProfileByName fires on second change to dropdown</title><link>https://www.infopathdev.com:443/forums/thread/124197.aspx</link><pubDate>Fri, 11 Jun 2021 16:54:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124197</guid><dc:creator>SeanPRyan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/124197.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=124197</wfw:commentRss><description>Thank you for answering, Hilary. I figured this out, so I hope this helps someone else.

Found this interesting that I never bumped into this before, but you cannot set the value of a people picker out of the gate if it is inside a hidden section unless that section is within the same one that helps show that section.

Field in Section 1: dropdown choice with values &amp;quot;New&amp;quot;, &amp;quot;Old&amp;quot;
Field in Section 2 (hidden until the ddl is changed to &amp;quot;New&amp;quot;): people picker.

Rule, when Section1: dropdown changes, show Section 2 with the people picker inside it
Rule On Load, or on Change for the dropdown: Set the current user using GetUserProfileByName. 

This won&amp;#39;t work on form load and won&amp;#39;t work the first time you change the dropdown. Interestingly, it will work the second time you select a value.

In this instance, I want to show the Logged in user only after the dropdown unhides Section 2. So, I created a new nested hidden section inside Section 1 and called it HiddenUserSection. This is always hidden and I placed the people picker in here. This will update.
Now, I placed a Calculated value in Section 2. I point this to the people picker. Now, that value loads and cannot be altered.

I gave the calculated value borders to make it look like the other fields. :-)</description></item><item><title>Re: GetUserProfileByName fires on second change to dropdown</title><link>https://www.infopathdev.com:443/forums/thread/124192.aspx</link><pubDate>Thu, 10 Jun 2021 22:19:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124192</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/124192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=124192</wfw:commentRss><description>Any chance I can see a copy of your form? You can attach it to a reply under the Options tab.... Or send me an email via the forum, and I&amp;#39;ll reply and you can attach it to my reply (forum email doesn&amp;#39;t include attachments).</description></item><item><title>GetUserProfileByName fires on second change to dropdown</title><link>https://www.infopathdev.com:443/forums/thread/124190.aspx</link><pubDate>Thu, 10 Jun 2021 19:36:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124190</guid><dc:creator>SeanPRyan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/124190.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=124190</wfw:commentRss><description>I have a connection file on my client&amp;#39;s site. The InfoPath 2013 form should set the current user 3 nodes when the dropdown changes. I compare this with a hidden counter field which is blank on new entries prior to submit.  When I choose an entry from the dropdown, hidden sections show. The people picker is within the section.  The rules don&amp;#39;t fill the field on the first try.  Now, when I change the dropdown to another value, it fills as I&amp;#39;d like. In the Form load, I set the logged in user to a hidden field. I set the AccountName to this value and Run the Query. On the dropdown, I set the 3 nodes. Why does it work on the second try but not the first? I&amp;#39;ve tried changing the postback settings to always and this still occurs. I also created a new basic form on the same site where this does not occur.

Thanks in advance.</description></item></channel></rss>