You can do it with conditional formatting. No code involved.
Put the portion in a section then conditional format the section based
on the users role. Put the fields you want inside the section.
Josh
Hi Josh,
Thanks for the reply.
The user roles are not available for browser compatible forms.
We are able to use the managed code now.
We need to query AD using LDAP to retrieve user roles in managed code.
> You can do it with conditional formatting. No code involved.
>
[quoted text clipped - 23 lines]
> > We are trying to do this by using Visual Studio Tools for Application (VSTA
> > ) but we get error while publishing this browser compatible infopath form
Josh - 20 Nov 2006 04:56 GMT
If you are wanting to do this server side, you'll have to make a
webservice that querys AD for you and then call that webservice from
your form.
I have some C# code that querys AD. By using code behind the form,
you'll need to sign it. I had implementation problems with a
webservice, but they're are examples out there.
Use this lab as reference. This is where I started.
http://msdn2.microsoft.com/en-us/office/ms788214(office.11).aspx
> Hi Josh,
>
[quoted text clipped - 30 lines]
> > > We are trying to do this by using Visual Studio Tools for Application (VSTA
> > > ) but we get error while publishing this browser compatible infopath form
Aza - 07 Dec 2006 07:23 GMT
Hi Atul .. i am currently working on a simmular problem where by users that
are logged in see one view and anonymous users see another..
This works fine for logged users however when the anonymous user loggs in an
exception is thrown: HttpException, Exception Message: Server cannot set
status after HTTP headers have been sent.
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
if (User is Authenticated)
e.SetDefaultView("Secure");
}
Any feed back would be appreciated Thanks
> Hi Josh,
>
[quoted text clipped - 30 lines]
> > > We are trying to do this by using Visual Studio Tools for Application (VSTA
> > > ) but we get error while publishing this browser compatible infopath form