success-message with control value

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

success-message with control value

vbr
Hello,

I would like to display a success-message with a control value like that :

Your dossier ${dossierIdControl} has been processeed.

Is-it possible and how?

Thank you for your help!

--
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 post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: success-message with control value

Alessandro  Vernet
Administrator
Hi Vincent,

The `message` parameter supports XPath Value Templates (see link below), so
something like `success-message(message = "Your dossier {//dossierIdControl}
has been processed.")` should do the trick. You'll let me know if this works
for you.

https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#success-message-and-error-message

‑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 post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
vbr
Reply | Threaded
Open this post in threaded view
|

Re: success-message with control value

vbr
Hi Alessandro,

Thank you for the response, it works!

Another question, is it possible to define the message in a localized
property?

Also, in my process action I would like to send the form to an external
service and then read a response header from the service and display it in
the sucess message?

--
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 post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: success-message with control value

Alessandro  Vernet
Administrator
Hi Vincent,

For localization, I imagine one possibility could be to use Form Runner
resources to define the properties (see 1st link below), like:

<property
    as="xs:string"
    name="oxf.fr.resource.*.*.en.acme.message"
    value="My message"/>
<property
    as="xs:string"
    name="oxf.fr.resource.*.*.fr.acme.message"
    value="Mon message"/>

Then in XPath use the `xxf:r()` function (see 2nd link below), as follows:

xxf:r(
    'acme.message',
    'fr-fr-resources'
)

I haven't tried this myself, so consider the above as pseudo-code ;).
Regarding your second question, unfortunately, you currently can't extract
the message from a response until we implement #1688 (see 3rd link below),
which we'll hopefully do sooner than later.

https://doc.orbeon.com/configuration/properties/form-runner#overriding-resources
https://doc.orbeon.com/xforms/xpath/extension-functions/extension-core#xxf-r
https://github.com/orbeon/orbeon-forms/issues/1688

‑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 post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: success-message with control value

Alessandro  Vernet
Administrator
Hi Vincent, did you get a chance to try setting properties to define your own
resources to be localized, as suggested in my previous message? 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 post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet