<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/81237.aspx</link><pubDate>Wed, 01 Aug 2012 22:08:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81237</guid><dc:creator>Nancy Young</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/81237.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=81237</wfw:commentRss><description>&lt;p&gt;Brilliant.&amp;nbsp; Thanks.&lt;/p&gt;</description></item><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/70102.aspx</link><pubDate>Wed, 07 Sep 2011 15:44:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70102</guid><dc:creator>leoffneym</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70102.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=70102</wfw:commentRss><description>&lt;p&gt;You can do the same thing I am doing with usernames by using emails.&lt;/p&gt;
&lt;p&gt;You would be matching the email to email instead of username to username is the only difference I see.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here is what your input would look like, from 1 to 5.&amp;nbsp; Changing Username to UserEmail (from secondary data source) and currentUser to email (your hidden field)&amp;nbsp;since you are using email as your key to who is using the form at the moment.&lt;/p&gt;
&lt;p&gt;In order to make it work, you would want to use to go to tools -&amp;gt; form options -&amp;gt; open and save -&amp;gt; rules and add the rule set UserRole.&lt;/p&gt;
&lt;p&gt;I have hidden items since they don&amp;#39;t pertain to what you needed.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i1125.photobucket.com/albums/l585/eviltimes8/getRole.jpg" alt="" /&gt;&lt;a href="http://i1125.photobucket.com/albums/l585/eviltimes8/getRole.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have more questions, feel free to ask.&lt;/p&gt;</description></item><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/70086.aspx</link><pubDate>Wed, 07 Sep 2011 12:42:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70086</guid><dc:creator>tafavorite</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70086.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=70086</wfw:commentRss><description>&lt;p&gt;I have 3 columns&lt;/p&gt;
&lt;p&gt;Form&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Email&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Role&lt;br /&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="mailto:Dave@name.com"&gt;Dave@name.com&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee&lt;br /&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="mailto:Jane@name.com"&gt;Jane@name.com&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Employee&lt;br /&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="mailto:Bob@name.com"&gt;Bob@name.com&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee&lt;br /&gt;234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="mailto:Dave@name.com"&gt;Dave@name.com&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee&lt;/p&gt;
&lt;p&gt;And so on. The way we get current user is by using the (Get user profile service.aspx) and then in order to know when current user is in the form, we prepopulate a hidden field with their work email from that service at form load. (We have to work in IP 2003) &lt;/p&gt;
&lt;p&gt;Maybe a sample you have could help. Not sure how much more I could explain. One thing I think I did not say was that I am basically trying to restrict the form to only certain users. If it is not one of these users, then the form goes to a different view. Is that possible with this control or am I thinking incorrectly? Thanks for the help.&lt;/p&gt;</description></item><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/70043.aspx</link><pubDate>Tue, 06 Sep 2011 14:03:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70043</guid><dc:creator>leoffneym</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70043.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=70043</wfw:commentRss><description>&lt;p&gt;What are your columns from your sharepoint list?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You list 2 of them, is that all?&amp;nbsp; Do you have username as well in the sharepoint list?&lt;/p&gt;
&lt;p&gt;Ex: &lt;/p&gt;
&lt;p&gt;Username&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Role&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Email&lt;br /&gt;Bob Marley&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Manager&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Bob.Marley@company.com&lt;br /&gt;Jane Doe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee&amp;nbsp;&amp;nbsp;&amp;nbsp; Jane.Doe@company.com&lt;br /&gt;John Smith&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Employee&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;John.Smith@company.com&lt;/p&gt;
&lt;p&gt;This is the least amount of info needed to make the roles work correctly.&lt;/p&gt;</description></item><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/69998.aspx</link><pubDate>Fri, 02 Sep 2011 19:26:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69998</guid><dc:creator>tafavorite</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69998.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69998</wfw:commentRss><description>&lt;p&gt;Could you elaberate more on what you mean here. Trying to accomplish this, but just not working out.&lt;/p&gt;
&lt;p&gt;Filter and add where Name on the Form Users data connection is equal to UserName. (This is why the name that goes into the UserName field should match the Name on the Form Users list from sharepoint)&lt;/p&gt;
&lt;p&gt;So far, I have a field called current user that takes the users email and populates in. Then I have a field called UserName (this is taken from sharepoint list). Sharepoint list has&amp;nbsp;2 fields (Role) and (email). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;What I am trying to do is&amp;nbsp;limit the form to only open to users that are on this list. Otherwise it switches view to a default message we want to show.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/65352.aspx</link><pubDate>Tue, 22 Mar 2011 16:37:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65352</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65352.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65352</wfw:commentRss><description>&lt;p&gt;Hey, I just wanted to say thank you for taking the time to post this! I&amp;#39;m sure others will find it helpful, and I appreciate that you are willing to share this information with the community.&lt;/p&gt;
&lt;p&gt;Have a great day!&lt;/p&gt;</description></item><item><title>A Better User Role</title><link>https://www.infopathdev.com:443/forums/thread/65179.aspx</link><pubDate>Tue, 15 Mar 2011 12:51:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65179</guid><dc:creator>leoffneym</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65179.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65179</wfw:commentRss><description>&lt;p&gt;This is more of a helpful tutorial than a question,&amp;nbsp; Its something I have used to help with the way our forms function within our company. This may or may not work for you, but I wanted share it since it has worked so well for us.&lt;/p&gt;
&lt;p&gt;Definitions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;InfoPath UserRole: the user roles defined within InfoPath&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;UserRole: The actual user role of the end user Ex: Manager, Approver&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of the problems we have with InfoPath is the InfoPath UserRole and how it relates to the actual UserRole.&amp;nbsp; This of course relates also to how InfoPath deals with the separation of Data and Functionality.&amp;nbsp; We needed a form that could be tested easier, UserRoles changed easier, and new Users added easier.&amp;nbsp; To do this without modifying the form became the challenge.&amp;nbsp; So we took the&amp;nbsp;seperate Data&amp;nbsp;approach, remove the data from InfoPath and put it into a Sharepoint List that is managed by one group.&lt;/p&gt;
&lt;p&gt;For this to work, you have to be able to pull the secondary data source from sharepoint (as a list) and get a username of some sort within InfoPath (using Webservices, code, etc.) then link the two together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How and why does this work better than the InfoPath UserRoles?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can add/change/delete users with ease?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ex:&lt;/strong&gt; You have a form with 25 users, 20 are A users, and 5 are B users.&amp;nbsp; In InfoPath, you have to add them as such.&amp;nbsp; If someone quits/changes positions/etc.&amp;nbsp; You have to modify your form.&lt;/p&gt;
&lt;p&gt;Using the seperate Data&amp;nbsp;approach if someone quits/changes positions/etc, you only change/delete from the list and its done, no uploads, no form modification, no end user updates, etc.&lt;/p&gt;
&lt;p&gt;When you have multiple roles on one form, this becomes invaluable for testing.&amp;nbsp; You can go from being role A one minute to being role B the next, and you don&amp;#39;t have to modify your form.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This also takes the person out of the form, and only uses the Role of the person.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ex:&lt;/strong&gt; Bob is the Manager, with InfoPath UserRoles, you use Bob throughout the form as Bob, his role within the form could be Manager, but he is still Bob.&lt;/p&gt;
&lt;p&gt;Using an external list, Bob no longer matters, only the Manager matters. Why, because the User Role is what matters.&lt;/p&gt;
&lt;p&gt;Bob is the&amp;nbsp;Manager,&amp;nbsp;so is&amp;nbsp;Betty&amp;nbsp;and&amp;nbsp;Brenda, all three could&amp;nbsp;are Managers, but only Manager matters within the form.&lt;/p&gt;
&lt;p&gt;You can combine the Persons within one UserRole using InfoPath UserRoles, but then Example one comes into play again.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;nbsp;it a time saver.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&amp;nbsp;You have 5 forms, all&amp;nbsp;forms use&amp;nbsp;the same UserRoles.&amp;nbsp; Using InfoPath UserRoles, &amp;nbsp;you have to enter them in every form, which can take a long time.&amp;nbsp; You could copy a premade form with the UserRoles assigned already, but when someone quits/changes positions, Example one gets multiplied by the number of forms you have.&lt;/p&gt;
&lt;p&gt;Using the seperate Data&amp;nbsp;approach, you only have to add 2 fields, and 1 data connection and its done.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How do we do this?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This does takes&amp;nbsp;some work on the designer of the form in the beginning, but in the end, you have a form that is A: easier to test, B: easier to add/delete/change Roles of users and C: you don&amp;#39;t have to modify the form to change roles again.&lt;/p&gt;
&lt;p&gt;In Sharepoint, create a new custom list, Form Users is a good name.&lt;/p&gt;
&lt;p&gt;The default columns I recommend are Name, and Role.&amp;nbsp; You can add Email as well or anything else you may need.&lt;/p&gt;
&lt;p&gt;In InfoPath, you will need 2 new fields and&amp;nbsp;1 new data connections (or 2 if you use UserProfileService.asmx to get user names, or another webservice)&lt;/p&gt;
&lt;p&gt;Add the sharepoint list Form Users as a data connection, with Name and Role being used from the list.&lt;/p&gt;
&lt;p&gt;Add 2 fields, UserRole and&amp;nbsp;UserName (change names as needed), and UserEmail if you added it to your list.&lt;/p&gt;
&lt;p&gt;In the Rules on form open, add the rule, SetUserName (change name as needed), this rule should set the UserName field using whichever way you use to get the current user&amp;#39;s name, whether by UserProfileService.asmx, code, etc.&lt;/p&gt;
&lt;p&gt;In the Rules on form open, add a rule under the previous, setUserRole(change name as needed), this rule should set the UserRole field.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Set the field to the Role from the Form Users data connection&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Filter and add where Name on the Form Users data connection is equal to UserName. (This is why the name that goes into the UserName field should match the Name on the Form Users list from sharepoint)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;You can then use the UserRole field as a way to hide, validate, etc other fields.&amp;nbsp; So that only certain User Roles need to fill out certain fields. Ex: Managers may only be required to fill out 1 field, but an Employee may be required to fill out 10 fields.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hopefully this helps someone out, if you have any questions, let me know.&lt;/p&gt;
&lt;p&gt;GM&lt;/p&gt;</description></item></channel></rss>