Hide when true logic question

I have multiple fields in a form.  The logic behind each fields hide checks for values in the form above and hides the field if the logic is true.
each field utilizes the same basic logic except the names of people that can see the field varies by the label of each field.  Therefore I've only include the logic to one of the fields as the others will follow the same change.  This logic is not working.  the field is showing everytime no matter what the value.  here is the logic for the hide when field:
EVD_status = "Draft" |

((EVD_projects = "Evolution" &
@V3UserName != "name1" &
@V3UserName != "name2" &
@V3UserName != "name3" &

@V3UserName != @Name([Abbreviate];Author))  |

(EVD_projects = "MEIPASS" &
@V3UserName != "name5" &
@V3UserName != "name6" &
@V3UserName != "name7"))

If the project is evolution and I'm name1,2,oe 3 I should see the filed no one else.
Thanks !
Paul
LVL 4
pratiganAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

larsberntropCommented:
1.  Is the form for the web or Notes client?
2.  What is the value of the form property: 'Automatically refresh fields'
3.  Assuming the formula is in the formula box on the Hide-when tab, is the checkbox turned on? (Post a screenshot of the tab!)
4. @V3Username reyturns the Abbreviated form of a hierarchical name e.g. John Doe/orgunit/org

I whacked together a form and provided I turn on the auto refresh, it just works.
0
Sjef BosmanGroupware ConsultantCommented:
ShowWhen:= EVD_status != "Draft" & 
((EVD_projects = "Evolution" & @UserName = "name1":"name2":"name3":Author) |
 (EVD_projects = "MEIPASS" & @UserName = "name5":"name6":"name7"));
!ShowWhen

Open in new window

Usually, thinking goes a lot easier with positive logic. Assumption; names are in full canonical form, feel free to use @Name where you need it.
0
pratiganAuthor Commented:
the form is for notes client. automatically refresh fields. The check box to hide when is checked.  The names are actually @V3UserName != "name/usa/csc" like that in the formula box.
using the showwhen, do I still have the check box checked hide when ? so I can interchange @Username instead of V3username ?  and just Author instead of abbreviated @Name author ?
This logic Sjef is so straight forward.  And I can string the names together with a :
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Sjef BosmanGroupware ConsultantCommented:
More correct would probably be this:
UserName:= @(Name([Abbreviate]; @UserName);
ShowWhen:= EVD_status != "Draft" & 
((EVD_projects = "Evolution" & UserName = "name1":"name2":"name3":@Name([Abbreviate]; Author)) |
 (EVD_projects = "MEIPASS" & UserName = "name5":"name6":"name7"));
!ShowWhen

Open in new window

ShowWhen is only a variable, nothing else. In the last line, the ShowWhen is negated, in order to produce the hide-when value.
0
pratiganAuthor Commented:
interesting.  I will apply this change and do some testing.  thank you, I will get back to you.
Thanks Again !!
0
pratiganAuthor Commented:
Ok.... This is one f the actual hidewhen boxes for 1 of the fields.  as you can see the first test is what varies for each field.  The doc type test and the names of course.  Does this look right ??  I've got 16 more filds to code thi logic for before I tart my teting.
Thank You !!

UserName:= @Name([Abbreviate]; @UserName);

ShowWhen:= (EVD_doc_type = "Fast Track Document" | EVD_doc_type = "PDD") & 

((EVD_projects = "Evolution" & 
UserName = "Michael R Waytkus/USA/CSC": "Joan P Abrams/USA/CSC": "Maria A Purvis/USA/CSC":
"Arthur J Gagnon/USA/CSC": "Paul R Ratigan/USA/CSC": "Robin Renko/USA/CSC":
@Name([Abbreviate]; Author): @IsMember("eMedNY Project Coordination"; @UserNamesList)) |

 (EVD_projects = "MEIPASS" & 
UserName = "Michael R Waytkus/USA/CSC":
"Arthur J Gagnon/USA/CSC": "Paul R Ratigan/USA/CSC": "Robin Renko/USA/CSC":
@Name([Abbreviate]; Author): "Dawn E Boland/USA/CSC": "Amy F Loskowitz/USA/CSC"));
!ShowWhen
0
pratiganAuthor Commented:
sorry for the spelling mistakes.  This text box on this site is causing my keyboard to type wrong letters and miss typing what I hit.  crazy.
0
Sjef BosmanGroupware ConsultantCommented:
Nope, but you're close! The colon separates string values, so you cannot use @IsMember there. And another suggestion, you'll see that soon enough.


UserName:= @Name([Abbreviate]; @UserName);
EvolutionUsers:= "Michael R Waytkus/USA/CSC": "Joan P Abrams/USA/CSC": "Maria A Purvis/USA/CSC":
"Arthur J Gagnon/USA/CSC": "Paul R Ratigan/USA/CSC": "Robin Renko/USA/CSC":
@Name([Abbreviate]; Author);
MEIPASSUsers:= "Michael R Waytkus/USA/CSC":
"Arthur J Gagnon/USA/CSC": "Paul R Ratigan/USA/CSC": "Robin Renko/USA/CSC":
@Name([Abbreviate]; Author): "Dawn E Boland/USA/CSC": "Amy F Loskowitz/USA/CSC";

ShowWhen:= EVD_doc_type = "Fast Track Document":"PDD" &
(EVD_projects = "Evolution" & (@IsMember(UserName; EvolutionUsers) |@IsMember("eMedNY Project Coordination"; @UserNamesList)) |
 EVD_projects = "MEIPASS" & @IsMember(UserName; MEIPASSUsers));
!ShowWhen

Final suggestion would be to put the names of these persons in a profile document, so you won't have to change the design whenever a person changes position. But then you'd use Names field, which doesn't require Abbreviate... ;-))
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pratiganAuthor Commented:
strange thing going on here.  this logic:
UserName:= @Name([Abbreviate]; @UserName);

EvolutionUsers:=
"Pat A Melnick/USA/CSC":
"Nancy E Dufresne/USA/CSC":

"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
@Name([Abbreviate]; Author);

MEIPASSUsers:=
"Kim L VanWormer/USA/CSC":
"Praveen Kumar Bandi/USA/SC/CSC":

"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
@Name([Abbreviate]; Author):
"Dawn E Boland/USA/CSC":
"Amy F Loskowitz/USA/CSC";

ShowWhen:= EVD_doc_type = "Fast Track Document":"PDD":"Test Plans":"Assessment" &

(EVD_projects = "Evolution" & (@IsMember(UserName; EvolutionUsers) |
@IsMember("eMedNY Project Coordination"; @UserNamesList)) |

EVD_projects = "MEIPASS" & @IsMember(UserName; MEIPASSUsers));
!ShowWhen

The first 2 users in the evolution users definition cannot see the field.  but the others in that defined group can.
0
Sjef BosmanGroupware ConsultantCommented:
I see no mistakes in the code... There's no typo in the names or so?

What if you remove your name from the 2nd list and try again? Can you still see the field?
0
pratiganAuthor Commented:
I don't either.  It appears to be working perfectly.  I took my name out and I couldn't see the field.  I put my name back in and I was able to see the field.
0
pratiganAuthor Commented:
Absolutely perfect.  Sjef is a Great resource and a major help in resolving design issues.
Thank You for all your Help !!
0
pratiganAuthor Commented:
I'm now getting more people indicating they can't see the field (which is a check box field) but other people thatare in the lists do see it.
I don't know where to go from here.
0
pratiganAuthor Commented:
to cofirm a fw things.  the box Hide paragraph if formula is true IS checked.
below is the hide logic in that logic box for that field.
no security options for that feld.  Any ideas what else to chec for. ?

UserName:= @Name([Abbreviate]; @UserName);

EvolutionUsers:=
"Pat A Melnick/USA/CSC":
"Nancy E Dufresne/USA/CSC":

"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
@Name([Abbreviate]; Author);

MEIPASSUsers:=
"Kim L VanWormer/USA/CSC":
"Praveen Kumar Bandi/USA/SC/CSC":

"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
@Name([Abbreviate]; Author):
"Dawn E Boland/USA/CSC":
"Amy F Loskowitz/USA/CSC";

ShowWhen:= EVD_doc_type = "Fast Track Document":"PDD":"Test Plans":"Assessment" &

(EVD_projects = "Evolution" & (@IsMember(UserName; EvolutionUsers) |
@IsMember("eMedNY Project Coordination"; @UserNamesList)) |

EVD_projects = "MEIPASS" & @IsMember(UserName; MEIPASSUsers));
!ShowWhen
0
pratiganAuthor Commented:
ok.. I'm geting additional feedback from people.  he goups not having issues are those groups that don't have flux names for Evolution vs MEIPASS.  this tells me there is possibly something wrong with the if structure.
So this would mean if you not in both of these groups then yor not seeing the field.  Taking the example below.  I'm thinking the or between the evolution test and the MEIPASS test should be an And.  But when I look more at he ShowWhen that doesn't do it.
UserName:= @Name([Abbreviate]; @UserName);

EvolutionUsers:=
"Michael R Waytkus/USA/CSC":
"Joan P Abrams/USA/CSC":
"Maria A Purvis/USA/CSC":
"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
@Name([Abbreviate]; Author);

MEIPASSUsers:=
"Michael R Waytkus/USA/CSC":
"Arthur J Gagnon/USA/CSC":
"Paul R Ratigan/USA/CSC":
"Robin Renko/USA/CSC":
"Kim L VanWormer/USA/CSC":
@Name([Abbreviate]; Author):
"Dawn E Boland/USA/CSC":
"Amy F Loskowitz/USA/CSC";

ShowWhen:= EVD_doc_type = "Fast Track Document":"PDD" &

(EVD_projects = "Evolution" & (@IsMember(UserName; EvolutionUsers) |
@IsMember("eMedNY Project Coordination"; @UserNamesList)) |

EVD_projects = "MEIPASS" & @IsMember(UserName; MEIPASSUsers));
!ShowWhen
0
pratiganAuthor Commented:
The EVD_doc_type test is an or condition separated by :  ?  so if the oc type is one of those listed in quoetes then that partof the logic is true and field is displayed so far.
0
Sjef BosmanGroupware ConsultantCommented:
You could add some or all of the condition to one or more Computed Text fields, either on the same form or on a test version of it, so you can test separate parts of the condition. If you doubt the first part for instance, You could write it differently:

ShowWhen:= @IsMember(EVD_doc_type; "Fast Track Document":"PDD") & etc...

Maybe the priorities in Formula language aren't "standard". Try this instead:

ShowWhen:= EVD_doc_type = "Fast Track Document":"PDD" &

(EVD_projects = "Evolution" & (@IsMember(UserName; EvolutionUsers) |
@IsMember("eMedNY Project Coordination"; @UserNamesList)) |

(EVD_projects = "MEIPASS" & @IsMember(UserName; MEIPASSUsers)));
0
pratiganAuthor Commented:
yup... looks good.  So far no complaints. My testing was successful again so its hard to determine all fields testing correctly.  But it looks good so far on my end of testing.
I'll keep you posted as the user testing continues.
Thanks !
0
Sjef BosmanGroupware ConsultantCommented:
Worst-case scenarion: add some statements to your code in the form of @Prompt([Ok]; "variable-name"; variable)

Debugging Formula language sucks... and has done so for years...
0
pratiganAuthor Commented:
I thin the additional () around the last piece of te formula did the trick.  everyone that should see can and those that shouldn't don't.
Thank You Sjef.
Very much appreciated.
0
Sjef BosmanGroupware ConsultantCommented:
:) You're welcome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.