close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Two "Show If" on a field?

Thread began 12/16/2010 5:55 pm by Sally | Last modified 12/17/2010 1:57 pm by Sally | 1548 views | 7 replies


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 %>
<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.


Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...