Composedocument method

Can someone provide the code that I can use to create a document using either Lotuscript or Formula language based on a field value.

In other words, if field TEST = “Yes”; Create Document.

If field TEST = “NO”; do nothing.

Subject: COMPOSEDOCUMENT METHOD

@if(TEST = “Yes”;“”;@return(“”));@command([compose…]);