In a View: Hide Button depending on the form of the selected document

Hi,

Is it possible, in a view, to hide a button depending on the form of the selected document?

Example: I have a button “Copy to New Legal Support” who should hide if the selected document in the view is not of type (=Form) “Legal Support”).

I know that workarounds are possible (multiple views, validation in the button code, or button on the form and not on the view) but I’d like to solve the problem as I don’t know why it shouldn’t work.

I’ve seen many threads about it in the forum, saying it’s impossible to achieve, but when you look in the calendar view of your mailbox, you discover dynamic options who hide depending on the selected event.

Remark:

I implemented a “Publish Meeting” button in the calendar view in the mail template, and this button hides when the selected event in the calendar is not a “Meeting” (example: “Reminder”)

It works in a calendar view, so why not in a common view?

Thank you by advance for your suggestions…

Philippe Pierlot

Lotus Notes Designer and Administrator

Belgium

Subject: In a View: Hide Button depending on the form of the selected document

In the view, you should be able to define “Hide when formula is true” for the button (or Action) and use something like the following formula: Form != “Legal Support”.

Might that work?

Regards,

Pascal

Subject: RE: In a View: Hide Button depending on the form of the selected document

Hi Pascal,

I already tried this unsuccesfully.

…

I finally found the solution:

the “hide when” is correct but not enough:

you also need to check a parameter in the view properties:

“Evaluate actions for every document change”

and it works…

=> it works fine now !!!

(

Other Remark:

I formerly used a shared action in the views but I couldn’t get it to work with the “hide when” so I copied the code of the action in each view…

)

Bye and thank you for your fast answer,

Regards,

Philippe Pierlot

Lotus Domino Designer and Administrator

Belgium

Hide when: fo