How to manage event only once time

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

How to manage event only once time

juan.sabastizagal
Hello all,
I am trying to control a event so it can occurs (or not) on the first time, for next similar events another event could be launch.
But It is no working.
Please some advise

<xf:action id="select_status-binding">
                <xf:action event="xforms-value-changed" ev:observer="client_status_code-control"
                           if="true() and $statusCont = '0'">
                               
                               <xf:setvalue ref="//client_code2_description"/>
                               
                               <xf:setvalue ref="statusCont" value="1"/>
                               <xf:setvalue ref="//aux"
                                 value="xxf:itemset('client_status_code-control', 'xml', true())/itemset/choices/item[@selected = 'true']/label"/>
                
                </xf:action>

                <xf:action event="xforms-value-changed" ev:observer="client_status_code-control"
                           if="true() and $statusCont = '1'">
                               
                               <xf:setvalue ref="statusCont" value="1"/>
                               <xf:setvalue ref="//aux"
                                 value="xxf:itemset('client_status_code-control', 'xml', true())/itemset/choices/item[@selected = 'true']/label"/>
                
                </xf:action>


Regards

--
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: How to manage event only once time

Alessandro  Vernet
Administrator
Hi Juan,

Let me make sure that I properly understand your question. Are you saying
that you'd like to run some XForms actions, like `xf:setvalue`, but only the
first time that users changes the value of a field, and not the following
times? If so, is it the first time for every time the page is loaded, or
just one time per form data? Or is it something different you're trying to
do?

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: How to manage event only once time

Alessandro  Vernet
Administrator
Juan, did you manage to do what you were aiming for with events? If not, you'll let me know if you have any feedback regarding my previous message.

-Alex

--
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