orbeon

Orbeon Forms: <FR:IF CONDITION doe not trigger


Some basic help please.. I have written the following action which triggers OK when a radio button option is selected:

However, the two "fr:if condition..." statements below do not trigger and update MyNumber field.

Any suggestions welcome.

Many thanks

enter image description here


Solution

  • A couple of things:

    1. fr:control-string-value() takes the control as its first parameter, but you're passing 'PONRAQ1/string()'. Instead you just want to be calling fr:control-string-value('PONRAQ1'). See doc.
    2. If you have a plain Yes/No Answer control, its value is a boolean, and so either true or false (not yes and no, despite the name). So you'll want to say fr:control-string-value('PONRAQ1') = 'true'.

    Hint: you can debug this type of code using <fr:alert> (doc).