> Thank you for your suggestion. I have been playing around with views.
> However, I just noticed that at the top of the Manage User Roles windowin
[quoted text clipped - 31 lines]
> > >
> > > Is this possible?
Thanks for the link to that article, I hadn't read that one yet.
How do you retrieve the name of the current user when the form is opened? I
was going to try your suggestion:
> You could combine this with saving the name of the user, who created the
> form, in a field in the form, check this name whenever the form is opened,
> and allow only this user (and the users of the HR department) to view the
> sensitive sections of the form (show/hide sections based on rules).
But when I went to add a new rule my only options, other than fields on my
form, were 'The expression', 'User's current role', 'Set of signable data...'
and 'Select a field or group...'.
The name of the person who filled out the form is already part of the form
data, so it would be helpful if I could just compare the current user against
that field on the form when the form is opened.
> If you have sensitive data that is being saved in the form, the best thing
> would be to encrypt/decrypt the nodes containing the sensitive data. Have you
[quoted text clipped - 44 lines]
> > > >
> > > > Is this possible?
S.Y.M. Wong-A-Ton - 12 Jan 2006 18:28 GMT
Under normal circumstances, i.e. no SharePoint, you could retrieve the
username with System.Environment.UserName (in C#), but I'm not quite sure
which context the InfoPath's code would be running under in SharePoint.
About the rules: Sorry, my mistake... I meant conditional formatting on
sections. You could set two conditions: The first one testing if the user has
the role of an HR member, and the second one testing whether the currently
logged on user has the same username as the one that was previously saved in
the form when the form was first filled out. The latter can be done by
writing an xdExtension to return the currently logged on username (check this
link for a how-to on xdExtensions:
http://blogs.msdn.com/infopath/search.aspx?q=xdExtension&p=1).
Note: It is important that the username field in the form is only saved
once, i.e. when the form is filled out for the first time, and not every time
the form is opened, since the latter would defeat the purpose of the solution
I suggested. :)
Let me know how things turn out; you've got an interesting scenario that
could be useful to others!
S.Y.M. Wong-A-Ton
> Thanks for the link to that article, I hadn't read that one yet.
>
[quoted text clipped - 60 lines]
> > > > >
> > > > > Is this possible?