Hide Action dependent on form

I have a view with documents, response documents and response-to-response documents. The form-names are “business”, “person” and “contact”.I have an view-action which creates a new document, but this has to be only possible when a certain document is selected. A new business-document is always possible, but a new person-document should only be created when a business-document is selected in the view.

I created a script which looked for the selected document with the following code:

Set dc = db.UnprocessedDocuments

Set doc = dc.GetFirstDocument

If Not doc.form(0) = “business” Then

Messagebox “Please select a business-document”,48,“Error”

Else

Call w.ComposeDocument( “”, “”, “person” )

End If

This works fine, but I prefer only displaying the action which are permitted.

I thought: “Wow, the new @GetField formula in Designer 6”. This works in an action button which displays the value of a form-field. But when I use this code in the hies-when formula, it does not work.

(The hide-when formula is: @If(@GetField(“form”)=“person”). This should hide the action when the selected document is a person-doc.

How to get this implementation work ?

Subject: Hide Action dependent on form

You must select the “evaluate actions for each document” property" in the view, and your hide-when formula should look like this:

Form != “business”

cheers,

Tom

Subject: RE: Hide Action dependent on form

Thank you very much !!I am working with R6 designer only a view days and I had not yet seen this new option.