Hide based on field value.

Posted on 2009-04-24
Last Modified: 2013-12-18
What is the syntax to hide text based on the value of a field. I have to tie a button so only the user in the "md" field can see that button. I normally do them based on roles.
Question by:jforget1
    LVL 22

    Expert Comment

    You need to write a formula that evaluates to @True or @False.

    The easiest way to check for a role is to use @IsMember (or @IsNotMember).

    For example, if you want to display a paragraph only to users with the [ViewAdmin] role, this would do the trick...

    @IsNotMember("[ViewAdmin]"; @UserRoles);
    LVL 22

    Expert Comment


    Also, for complex hide-when formulas, I find it easier to write a "show-when" formula, then just place a ! (not) operator before the entire expression.

    Author Comment

    The ones based on roles I am good with, I do those all the time. This is a case where I want a button to show only for the user in the MD field.
    LVL 22

    Accepted Solution

    Ok, it's basically the same.

    First, write a 'show-when' formula because it's easier than writing a 'hide-when'.

        @IsMember(@UserName; MD)

    Then, just take the inverse because we actually need a 'hide-when' formula...

        !@IsMember(@UserName; MD)

    The only problem you may encounter is if the names contained in the MD field are not hierarchical.  For example, if you are storing common names in MD, then you need to adjust the formula to use the common name as well.

    Author Comment

    That is exactly what I need, appreciate the help.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    This is an old article, please see an updated version of this article, located here:
    I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now