<?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>Views</title><link>https://www.infopathdev.com:443/forums/42.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Change Views based on userName()</title><link>https://www.infopathdev.com:443/forums/thread/74665.aspx</link><pubDate>Fri, 27 Jan 2012 16:27:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74665</guid><dc:creator>David.Young</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=74665</wfw:commentRss><description>&lt;p&gt;I found that (Seemingly) the case changes - Since it [is] case sensitive, I am translating everything like these to lowercase:&lt;/p&gt;
&lt;p&gt;translate(FName, &amp;quot;ABCDEFGHIJKLMNOPQRSTUVWYXZ&amp;quot;, &amp;quot;abcdefghijklmnopqrstuvwyxz&amp;quot;)&lt;/p&gt;
&lt;p&gt;Then compare fields - switch views accordingly.&amp;nbsp; Make sure to do this in the proper order - Form Load --&amp;gt; field --&amp;gt; etc (Order matters of course)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Hope to help,&lt;/p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Brush Script MT&amp;#39;;FONT-SIZE:14pt;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-theme-font:minor-fareast;mso-no-proof:yes;"&gt;David Young&lt;/span&gt; 
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="FONT-SIZE:10pt;mso-fareast-font-family:FangSong;mso-no-proof:yes;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;font face="Calibri"&gt;IT App. Programmer / Analyst II&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Change Views based on userName()</title><link>https://www.infopathdev.com:443/forums/thread/59194.aspx</link><pubDate>Wed, 22 Sep 2010 21:51:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59194</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=59194</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if this is a typo -- but I see in your example &amp;quot;JSmith&amp;quot; with a capital &amp;quot;S&amp;quot; -- Your conditions will be case sensitive, so keep that in mind.&lt;/p&gt;
&lt;p&gt;You can use rules with dialog box expressions to help you see why a condition isn&amp;#39;t being met. For example, in a rule prior to the rule for switching views, you could show a dialog box expression with the values of all the different &amp;quot;manager&amp;quot; text boxes, see if the values are being set prior to the rules for view switching running.&lt;/p&gt;</description></item><item><title>Change Views based on userName()</title><link>https://www.infopathdev.com:443/forums/thread/59192.aspx</link><pubDate>Wed, 22 Sep 2010 20:37:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59192</guid><dc:creator>Mikexna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=59192</wfw:commentRss><description>&lt;div class="richText"&gt;Hi,&lt;/div&gt;
&lt;div class="richText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;Scenario:&lt;br /&gt;A user fills out a form from a SharePoint Library and submits the&amp;nbsp;form using InfoPath 2007. (This is not a web forms services form.)&lt;/div&gt;
&lt;div class="richText"&gt;A SharePoint Workflow&amp;nbsp;sends an email to&amp;nbsp;5 diffent Managers with a link to the&amp;nbsp;xml file which opens in InfoPath 2007.&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;I need my managers to be sent to their own personalized view to click on a button to approve the&amp;nbsp;form and write their comments, etc.&lt;/div&gt;
&lt;div class="richText"&gt;Since I&amp;nbsp;have 5 managers, I created 5 views.&lt;br /&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;Because&amp;nbsp;I plan to create many forms&amp;nbsp;I do not want to&amp;nbsp;update&amp;nbsp;each form whenever a new manager&amp;nbsp;gets hired so I want the form to be dynamic.&lt;/div&gt;
&lt;div class="richText"&gt;Otherwise I know how easy it would be to add the user names of the managers to user roles&amp;nbsp;and switch the view with an open behavior rule for each.&lt;/div&gt;
&lt;div class="richText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;Here&amp;nbsp;was my plan.&lt;/div&gt;
&lt;div class="richText"&gt;1.&amp;nbsp; Create 5 text fields and name them Manager1, Manager2, etc.&lt;/div&gt;
&lt;div class="richText"&gt;2.&amp;nbsp; Create a data connection to my SharePoint List which has Job Title and UserName Columns&lt;/div&gt;
&lt;div class="richText"&gt;3.&amp;nbsp; Set the default values of the Manger1, etc fields to filter the data connection&amp;nbsp;based on thier job title and store the appropriate username.&lt;/div&gt;
&lt;div class="richText"&gt;4.&amp;nbsp; Create an Open Behavior Rule for each Manager like so:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;Apply the Role when the Condition is True:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div class="richText"&gt;Manager1field contains userName()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PS..I also tried &amp;quot;equal to&amp;quot; instead of contains)&lt;br /&gt;Switch to View: Manager 1&amp;#39;s View&lt;br /&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;I ALMOST got this working.&lt;/div&gt;
&lt;div class="richText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;Although I am successfull at setting the correct user name value in the Manger1 field&amp;nbsp;(example:&amp;nbsp;&amp;quot;JSmith&amp;quot;) my open behavior rule is not switching the view.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;I know I am setting the value correctly as&amp;nbsp;I see &amp;quot;Jsmith&amp;quot; in the field when I preview the form. &amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="richText"&gt;But &lt;br /&gt;&lt;br /&gt;When if&amp;nbsp;I set the default value to the manager1 field manually to Jsmith and use the same condition, the view switches perfectly.&lt;br /&gt;&lt;br /&gt;Any idea why InfoPath does not like my value when it is a result from a data connection filter?&lt;br /&gt;&lt;br /&gt;Thanks again for any suggestions you have!!!&lt;/div&gt;</description></item></channel></rss>