Orbeon Forms: IF/THEN/ELSE Statement using Actions with xPath

79 views Asked by At

I tried both of these IF statements in this post, but neither work.

However, they do work OK if you remove the type="xpath" statement ( see this form).

So how can you use an action with the type="xpath" statement with:

  • If/then/else in the action header
  • If/then/else in action body

A simple example would be great.

Many thanks in advance

PeteA

1

There are 1 answers

10
avernet On

Those examples shouldn't have had that type="xpath" attribute. I just removed those attributes from that answer to avoid possible confusion.

The type="xpath" attribute on an xf:action is used to specify that the action should run a server-side XPath script. This is particularly useful when using extension functions that have side effects. You can find more about this in the section Calling server-side XPath.