Issue when using multiple then statements

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue when using multiple then statements

Dylan Strachan
When I try to use a statement such as this: 
if ("xpath") then (action1 then action2) else action3 . 

I get an xpath error in orbeon, however if I change the second then to an or such as this:
if ("xpath") then (action1 or action2) else action3

The error goes away.  Why am I running into this xpath error?

Best,
Dylan


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/bf2313b5-6dcf-4c52-b3d2-9d4ceaaaa97dn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Issue when using multiple then statements

Alessandro  Vernet
Administrator
Hi Dylan,

The first expression looks correct, but often the devil is in the details.
Could you give us a concrete example of the process you are using, and also
give the exact error you are getting?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1600147614322-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue when using multiple then statements

Dylan Strachan
Hello Alessandro,

here is an example

if($Control1[contains(text(), 'someText1')] or
$Control1   [contains(text(), 'someText2')])
then (
replace($ Control1," someText1 ","newText1") then
replace($ Control1," someText2 ","newText2")
)
else $Control1    

Best,
Dylan

On Tue, Sep 15, 2020 at 12:26 AM Alessandro Vernet <[hidden email]> wrote:
Hi Dylan,

The first expression looks correct, but often the devil is in the details.
Could you give us a concrete example of the process you are using, and also
give the exact error you are getting?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/GQulo_d0rTo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1600147614322-0.post%40n4.nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAE2Vpuno8L%3DTGZZng3sCgX%3DVtZe9OmYo9S8tn3p7htuP2yBLLw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Issue when using multiple then statements

Alessandro  Vernet
Administrator
Hi Dylan,

The following is not valid:

    replace($Control1, "someText1", "newText1") then
    replace($Control1, "someText2", "newText2")

Instead, I think you want to have:

    replace(
        replace($Control1, "someText1", "newText1"),
        "someText2", "newText2")

You let me know if this indeed does what you had in mind.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1600218542123-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue when using multiple then statements

Alessandro  Vernet
Administrator
Hi Dylan,

Did you get a chance to try the expression with the nested calls to
`replace()`? If so did that work for you?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1600802026547-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet