Many instances in submission resource

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

Many instances in submission resource

pumbosha
Hi,

Firstly I'm sorry for my frequent questions, but I can'y find answers..

I want to use submission. I have three instances:

<xf:instance id="url"><value>http://example.org</value></xf:instance>
<xf:instance id="separator"><value>?param=</value></xf:instance>
<xf:instance id="param"><value>param_value</value></xf:instance>

and I want to make reource of submission as concat of this three instances:

<xf:submission id=.. instance=..
                                                           mediatype="application/xml"
                                                           method="get"
                                                           resource="{instance('resource')}{instance('separator')}{instance('param')}"
                                                           replace="instance"
                                                           serialization="none"

I mean in result I want to have in resource: http://example.org?param=param_value

I have tried to use concat function, but it is not working. How can I reach this effect ?
Reply | Threaded
Open this post in threaded view
|

Re: Many instances in submission resource

Erik Bruchez
Administrator
The AVT should work:

    resource="{instance('resource')}{instance('separator')}{instance('param')}"

or with concat:

    resource="{concat(instance('resource'), instance('separator'), instance('param'))}"

I tried both and either way works for me.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Many instances in submission resource

pumbosha
First solution isn't work for me (I think the problem is in value of separator-instance. It is '/'. I think that it is replaced by something ASCI code, because submission returns me errors like 404 and 500.It depends on destination of submission).
I'm. trying second solution.

Maybe there is simpler solution, like in dynamic-dropdown control? There is feature that allows write some parameters in URL: http://example.org?param={../name_of_control_which_have_param}. Is it very complicated feature if I would need to use some similar in my control ?

regards
Reply | Threaded
Open this post in threaded view
|

Re: Many instances in submission resource

Erik Bruchez
Administrator
There might be an easier solution, but I don't know enough context about what you want to do to be sure.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Many instances in submission resource

pumbosha
Ok. I found that on my own. There is method: xxf:evaluate-avt() which helped me.
Reply | Threaded
Open this post in threaded view
|

Re: Many instances in submission resource

Erik Bruchez
Administrator
Glad that's working. -Erik