Two "Show If" on a field?
What I have is a data grid of names and contact info. When you click on one it brings you to the detail page. If it's you, or the admin, I want the option to update the information. Otherwise, the info (minus the password) is only viewable.
My problem is in trying to get the password field to show on the detail page only if it is the user's detail info ("If Self") or for the admin ("Admin Priv"). I can do either one, but I'm having trouble doing both. Here's my code:
<% If (WA_Auth_RulePasses("Admin Priv")) Then ' Begin Show Region %>
<% If (WA_Auth_RulePasses("If Self")) Then ' Begin Show Region %>
<th>Password:</th>
<td><input type="text" class="WAATKTextField" name="txtpassword" id="txtpassword" value="<%=(rs_resident_detail.Fields.Item("txtpassword").Value)%>" /></td>
<% End If ' End Show Region %>
<% End If ' End Show Region %>
If I'm the admin, but it's not my record, it won't show the field. Would I be better off to just duplicate the password field and apply a Show If to each instance of it? If I do duplicate the field, will that cause problems when Update is selected to update the database?
Also, I need to do the same thing to the Update button - either duplicate it or figure out how to get two Show If to work on one instance. But what I'm wondering is, if it's not your record and you are not admin the fields still appear editable. You can update any changes so it doesn't really cause problems, but is there a way to make it so others wouldn't even have the option of trying to edit the fields?
Thank you for any help.
Sally