Hiding fields - InfoPath Dev Sign in | Join | Help in Browser Forms InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Browser Forms » Hiding fields Hiding fields Last post 07-19-2009 11:14 PM by warrtalon. 10 replies. Page 1 of 1 (11 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 02-26-2009 08:28 AM AyaBabe Joined on 02-10-2009 Minnesota Posts 15 Hiding fields Reply Contact Can someone tell me the best way to hide two fields that are only viewable to a site administrator and hidden to a user? I have an "Issue Tracking" form where I don't want users to fill out my "resolution summary" and "date resolved" sections. Thanks! 02-26-2009 09:09 PM In reply to swathip Joined on 10-30-2007 India Posts 487 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact Hi, Add the two user roles Site administrator and user to the form. Add the conditional formatting to the two fields as if the user's current role is not equal to Site administrator then hide the field. Swathipwww.ggktech.com 02-27-2009 08:03 AM In reply to AyaBabe Joined on 02-10-2009 Minnesota Posts 15 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact I thought user roles weren't supported by InfoPath Forms Services............................. 02-27-2009 09:29 AM In reply to Alec Pojidaev Joined on 12-16-2008 Posts 163 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact AyaBabe: I thought user roles weren't supported by InfoPath Forms Services............................. That's correct they are not supported. But because you have access to the MOSS webservices you could use usergroup.asmx to determine if user is a member of a group.Although connecting that service is not as straightforward as it would be in userprofile.asmx case. I used GetUserCollectionFromGroup method. http://alecpojidaev.wordpress.com/ 02-27-2009 09:44 AM In reply to AyaBabe Joined on 02-10-2009 Minnesota Posts 15 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact How do you use that method in InfoPath? Do you post it in notepad and save it as an XML file? I looked up GetUserCollectionFromGroup here: http://msdn.microsoft.com/en-us/library/ms772554.aspx Thanks 02-27-2009 09:56 AM In reply to Alec Pojidaev Joined on 12-16-2008 Posts 163 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact THere is a good article how to use that method in InfoPath on the web. Sorry, I don't have time to find it right now. If you wont be able find it in couple hours I'll try to find some time to do that for you. http://alecpojidaev.wordpress.com/ 02-27-2009 11:01 AM In reply to Alec Pojidaev Joined on 12-16-2008 Posts 163 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact Here is the link. No code required which is allowing you to keep form trust level as domain. http://blog.ianchivers.com/wordpress/?p=37 http://alecpojidaev.wordpress.com/ 02-27-2009 12:50 PM In reply to AyaBabe Joined on 02-10-2009 Minnesota Posts 15 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact That link explains how to set user information for a drop-down control. I followed the directions and [I think] I applied the data connection to the section in my form. What do I do now to make it hide the section?? Use conditional formatting?? 02-27-2009 02:01 PM In reply to AyaBabe Joined on 02-10-2009 Minnesota Posts 15 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact Thanks, everyone for all your help! I created a new SECTION CONTROL that I pasted the two fields I wanted hidden and just simply used conditional formatting on the SECTION and added rules. It works just like I wanted. 02-27-2009 03:17 PM In reply to Alec Pojidaev Joined on 12-16-2008 Posts 163 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact Nice. Yes, after you got the data all you need is just to apply double eval trick to get concatenated string of group members. Then simple contains() check will give you desired result. http://alecpojidaev.wordpress.com/ 07-19-2009 11:14 PM In reply to warrtalon Joined on 12-13-2007 Denver, CO Posts 980 Re: Hiding fields Mark as Not AnswerMark as Answer... Reply Contact Here's my new version of User Roles in browser-enabled forms using GetCommonMemberships of the UserProfileService. This one leverages Active Directory security groups and distribution lists: InfoPath – User Roles in Browser-Enabled Forms Using Groups Clayton Cobb || SharePoint MVP || Clayton's SharePoint MadnessPlanet Technologies || Federal Partner of the Year (2005-2010) || SLG Partner of the Year (2010) Page 1 of 1 (11 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Can someone tell me the best way to hide two fields that are only viewable to a site administrator and hidden to a user?
I have an "Issue Tracking" form where I don't want users to fill out my "resolution summary" and "date resolved" sections.
Thanks!
Hi,
Add the two user roles Site administrator and user to the form. Add the conditional formatting to the two fields as if the user's current role is not equal to Site administrator then hide the field.
I thought user roles weren't supported by InfoPath Forms Services.............................
AyaBabe: I thought user roles weren't supported by InfoPath Forms Services.............................
That's correct they are not supported. But because you have access to the MOSS webservices you could use usergroup.asmx to determine if user is a member of a group.
How do you use that method in InfoPath? Do you post it in notepad and save it as an XML file?
I looked up GetUserCollectionFromGroup here: http://msdn.microsoft.com/en-us/library/ms772554.aspx
Thanks
THere is a good article how to use that method in InfoPath on the web. Sorry, I don't have time to find it right now. If you wont be able find it in couple hours I'll try to find some time to do that for you.
Here is the link. No code required which is allowing you to keep form trust level as domain.
http://blog.ianchivers.com/wordpress/?p=37
That link explains how to set user information for a drop-down control.
I followed the directions and [I think] I applied the data connection to the section in my form.
What do I do now to make it hide the section?? Use conditional formatting??
Thanks, everyone for all your help!
I created a new SECTION CONTROL that I pasted the two fields I wanted hidden and just simply used conditional formatting on the SECTION and added rules. It works just like I wanted.
Nice. Yes, after you got the data all you need is just to apply double eval trick to get concatenated string of group members. Then simple contains() check will give you desired result.
Here's my new version of User Roles in browser-enabled forms using GetCommonMemberships of the UserProfileService. This one leverages Active Directory security groups and distribution lists:
InfoPath – User Roles in Browser-Enabled Forms Using Groups