Hide Formula - Except for approver

I have created a form that 2 people will be entering data in. However, I don’t want them to be able to print the form unless it has been approved.

I have a 3rd person who is the approver. So this is how I want it to work.

A user opens the form, fills out the information and saves it. But they can’t see the field for the approver.

The Approver opens the form, reviews it, and assigns it “Approved” in the field that was hidden from the creator.

Now that the form is approved, the first user can go back in and print it.

please help.

Subject: RE: Hide Formula - Except for approver

It sounds like you need to read the Designer wiki entry Allow only selected users to print a form in the Notes client .

As for hiding controls and fields based on the user’s identity, this is easily done using @UserName, @UserRoles, and/or @UserNamesList in a hide formula (depending how you know who the approver is).

Do not hardcode usernames into your design.

Subject: RE: Hide Formula - Except for approver

Andre,you have responded to my posts in the past. I know you are very knowledgeable about Notes.

I have read the wiki article a dozen times after you posted it. While I understand it will acheive my goal, I don’t know how to apply it.

Do I create a field called $KeepPrivate? then enter the code it provided?

Do I just enter the code in the form properties tab for printing?

Please help me understand how to apply $KeepPrivate

Subject: RE: Hide Formula - Except for approver

I have modified the article in a way that I hope will make it clearer.

Subject: Hide Formula - Except for approver

You can have fields be visible on a form using Hide / When formulas.

You’re hiddne fields coud be based on a Role, say [Approver], where the hide when is !@IsMember(“[Approver]”;@UserRole)

You could also use Contriol Access Sections.

Preventing of printing, you could do look at $KeepPrivate or use the Hide / When Printing check mark set on version 1 of the form and once approved change the form to version 2 where that hide / when is NOT checked.

As a reminder, just because something is hidden doesn’t mean the Creator cannot look at the document properties to see what other fields may exist on the document.

Also prevention of print can be “beat” by doing things like print screens.

Subject: RE: Hide Formula - Except for approver

Thank you for your response.

When I enter the code below, it doesn’t like the @UserRole part.

!@IsMember(“[Approver]”;@UserRole)

If I change the code to: !@IsMember(“[Approver]”;“”), it accepts the code, however, the field doesn’t show up on the form even for the approver.

I created 2 roles. Approver and Author.

The author creates the document, and the approver approves the document.

Please let me know what I did wrong.

As for hiding the field when printed, I checked the option “Hide when printed”. Because I don’t need the Approved field to ever print.

Subject: RE: Hide Formula - Except for approver

Excuse my error, it’s @UserRoles (with an s)

!@IsMember(“[Approver]”;“”)

is always going to evaluate to True and thus hide. (Approver is not a member of “”, So not False is True)

Subject: RE: Hide Formula - Except for approver

Thank you, that fixed the visibility of the field issue.

Now, I only want the form to be able to print, once it has been approved.

You said check the box to hide print when version 1, and set to uncheck when it’s version 2 (after it’s been approved).

How do I do this?

Subject: RE: Hide Formula - Except for approver

Hello, read all the responses in the thread.