Hide problem

I have a button with the hide checked if following formula is true:

ReqStatus != “Review” |

@IsNotMember( @Name([Abbreviate];@UserName)

          ; Reviewers )

Problem is the button is displayed when I open the document in preview mode, but disappears when I double click to go into edit mode.

Any ideas?

TIA,

Ped Perez/Austin/IBM

Subject: Hide problem

Look at the document properties of a document before you open it and see what the value is of these fields: ReqStatus or Reviewers field. Next open the document in the edit mode and see what the value of the same fields are by looking at document properties.

Subject: RE: Hide problem

The ReqStatus field is consistent in edit or preview mode.

Following are the values of the Reviewers field in various mode:

  1. from the view, without opening the document, it contains “Ped Perez/Austin/IBM”

  2. opening the document in preview mode, it contains “CN=Ped Perez/OU=Austin/O=IBM”. The button is displayed in this mode.

  3. opening the document in edit mode, it contains “CN=Ped Perez/OU=Austin/O=IBM”. The button is hidden in this mode.

I guess I have 2 questions here.

  1. How is the Reviewers field changed just by opening the document.

  2. Field does appear to change from preview to edit mode, so how is it hidden in one but not the other?

Thanks,

Ped

Subject: RE: Hide problem

In the preview mode you are still only ‘reading’ the document so the formula thinks the value of Reviewers is “Ped Perez/Austin/IBM”. You hide when formula uses the abbreviated form of the logged in users name (Ped Perez/Austin/IBM)to see if it is in the Reviewers field. In the read (Preview) mode it is there, in the edit mode it is not (because it has CN= in there). If checking for the common name will work for you, try using !@Contains instead of @IsNotMember:

!@Contains(Reviewers;@Name([CN];@username))

If you need the abbreviated name to resolve names, then you’ll have to check if the document is being edited or not and switch between @Name([Abbreviate]… and just @Username…

@If(@IsDocBeingEdited;@IsNotMember(@Username,Reviewers);@isNotMember(@Name([Abbreviate];Reviewers))

Subject: RE: Hide problem

The !@Contains() worked. The button is now displayed in both preview and edit mode.

Thanks a lot for the help.

Ped

Subject: Lose the @name([abbreviate])

That’s your problem.