how to set read only properties to the particular info path form control based on user logged in?
views:
10answers:
1
Q:
how to set read only properties to the particular info path form control based on user logged in?
A:
Your best option (assuming you are using managed code) is to get the user name with either Application.User.UserName
or HttpContext.Current.User.Identity
and then call IsInRole
(I believe it is a member of the WindowsPrincipal class).
Save the result into the value of a field and you can then use the standard conditional formatting to lock the fields you don't want the users changing. I also usually conditionally change the look of those readonly fields (grey background fill etc) so the users don't get confused and think they can edit.
ktharsis
2010-10-26 12:27:49