Check if a numeric field has a value

4 views
Skip to first unread message

danieldotnet

unread,
Jun 10, 2021, 4:25:33 PM6/10/21
to orb...@googlegroups.com
Hello,

I have a numeric field and I want another field to become a mandatory field
as soon as a number is in this numeric field. Unfortunately I did not find a
solution anywhere ...

Best regards,
Daniel

--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

unread,
Jun 11, 2021, 6:29:53 PM6/11/21
to orb...@googlegroups.com
Hi Daniel,

You can use the expression `$number/string() castable as xs:decimal`,
assuming your number field is named `number`, which you put in the
Validations and Alerts tab, as shown below. And the GIF linked below also
shows what this lookalike at runtime.

control-settings.png
<http://discuss.orbeon.com/file/t119778/control-settings.png>
required-if-number.gif
<http://discuss.orbeon.com/file/t119778/required-if-number.gif>

You'll let me know if this works for you,

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply all
Reply to author
Forward
0 new messages