Can Formula Language loop through multiple selected documents and check for a specific condition?

Hi

Can anyone help with some Fomula Language to amend the Forward action to do the following:

  • User selects one or multiple documents, then triggers Forward Action

  • Formula language in Forward Action first loops through all selected documents to check if MySpecialDoc = “1”

  • If MySpecialDoc = “1” then

    use MySpecialForward method, i.e. @Command([ToolsRunMacro];“(MySpecialForwardMethod)”)

    else

    just forward as normal, i.e. @Command([MailForward])

I know I could loop through the selected docs in Lotusscript to determine if any meet the MySpecialDoc condition but I cannot then use Evaluate to call back to the original Forward method ( @Command([MailForward]) ) if they do not.

So, I would really appreciate any help on whether this evaluation of the selected docs can be achieved through the Action first in Formula Language (or perhaps I need a separate agent to return the condition to formula language) or is this just not achievable???

Thanks in advance for any help

Paul

Subject: Can Formula Language loop through multiple selected documents and check for a specific condition?

i ‘think’ that if the agent is ‘all selected’ documents, or you are using a button. if you do something like @If(myspecialfield=“1”;blahblah); this would run on each document. The trouble is it would run the agent each time it found a matching document…

I don’t think you can actually loop through and get a handle on the documents individually