<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Issues with hiding/not hiding sections</title><link>https://www.infopathdev.com:443/forums/thread/82417.aspx</link><pubDate>Fri, 07 Sep 2012 02:23:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82417</guid><dc:creator>ilancerose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82417.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=82417</wfw:commentRss><description>Thanks. I thought about that. Our AD is not completely populated. Our IT people (10) could be easily updated. But I plan to use this to roll out other forms and need to be able to lookup items on sharepoint list.

So it appears there are two ways of doing this. 

1) In the rules, load the query fields, query the data, then set a field value.

2) In the rules, set a field value and use a filter to filter for the correct name.

Is this correct?</description></item><item><title>Re: Issues with hiding/not hiding sections</title><link>https://www.infopathdev.com:443/forums/thread/82409.aspx</link><pubDate>Thu, 06 Sep 2012 22:25:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82409</guid><dc:creator>srudenko</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82409.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=82409</wfw:commentRss><description>Are you able to pull in the Department info from GetUserProfileByName.
I am doing something similar where I want the users of a certain IT department to access some sections and be able to edit while everyone else can only see a read only version.
I am pulling in the Department data from GetUserProfileByName then setup rules so that if Dept does not equal whatever you specify then show a read only section.

Again, this would be a better solution if you have the dept info and the group you need all share this in common. That way you wont have to lookup the username and then try to match it against some other list.</description></item><item><title>Re: Issues with hiding/not hiding sections</title><link>https://www.infopathdev.com:443/forums/thread/82324.aspx</link><pubDate>Wed, 05 Sep 2012 14:28:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82324</guid><dc:creator>ilancerose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82324.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=82324</wfw:commentRss><description>Thanks. That makes sense.

I think I have it working, but it seems like a huge kludge for a fairly simple form.

I setup 3 textbox fields.  The first (txtUserName) retrieves the UserName from the UserProfileService. The other (txtITName) does a lookup in the IT list and if it finds a match, places the name into the textbox. Both of these load on form load. Then, I added a rule onto the txtItName textbox that whenever the value changes, if the txtUserName and txtITName are equal, it sets a third textbox (txtITcheck) to &amp;#39;Yes&amp;#39;. The section I want to hide has a formatting rule that says if txtItCheck = &amp;#39;Yes&amp;#39;, then show the section and a second formatting rule that says if txtITcheck is not equal to yes, hide the section.

I tried having the section just check if the txtUsername = txtITName, but it would not work.  I plan to go back and clean that part up a little.

Is this pretty standard or am I doing this the hard way. It seems like a more complicated form would become a mess of rules and hidden text boxes pretty quickly.</description></item><item><title>Re: Issues with hiding/not hiding sections</title><link>https://www.infopathdev.com:443/forums/thread/82319.aspx</link><pubDate>Wed, 05 Sep 2012 12:54:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82319</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=82319</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi-&lt;/p&gt;&lt;p&gt;Formatting is not allowed on Form Load because a Formatting rule must be associated with a specific control. So you must select a control (a field, a section) and then add your Formatting rule. The formatting will be triggered (applied) on this section per the conditions you specify.&lt;/p&gt;&lt;p&gt;Hope this helps! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Issues with hiding/not hiding sections</title><link>https://www.infopathdev.com:443/forums/thread/82299.aspx</link><pubDate>Tue, 04 Sep 2012 21:37:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82299</guid><dc:creator>ilancerose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82299.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=82299</wfw:commentRss><description>I am trying to hide sections on an infopath 2010 form when users view an form, but show them when IT users view the form. I have a sharepoint 2010 list containing the IT users, with a column for the network name (jdoe for john doe) and a column with their full name (John Doe). So when the form loads, I want to check the list using the username() to determine if the sections should be hidden or visible.  I have created the data connection to the list. I am using a browser form.

My plan is to use a rule in the Form Load rules to set a field, called UName, to the &amp;#39;UserName&amp;#39; returned from the UserProfileService GetUserProfileByName. This seems to work just fine.  

I am stuck there. On the UName field rules, when this field changes, I want to lookup the username in the SP list. If the name is found, I want to show the sections, but if the name is not in the list, I want to hide them.

I have a couple of questions: 

1) Can I not do formatting in the Form Load rules? It is disabled in the Rule Type dropdown list?
2) What is best practices for conditionally hiding/displaying sections?

Thanks,

Lance</description></item></channel></rss>