Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Hide based on field value.

Posted on 2009-04-24
5
Medium Priority
?
224 Views
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.
0
Comment
Question by:jforget1
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 24224883
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);
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 24224905
(cont)

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

Author Comment

by:jforget1
ID: 24224981
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.
0
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 2000 total points
ID: 24225521
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.
0
 

Author Comment

by:jforget1
ID: 24225588
That is exactly what I need, appreciate the help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

580 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