Hi,
I have a form with templates and another one that is where I have the templates. In the form where I have the templates I need to calculate the initial value of a field depending on the value of a field in another section. The data of the field of the section that I need to know its value is loaded dynamically, it is not a fixed data. Then depending on that field I have two radio buttons and the value changes. But the condition I have created doesn´t work once I deploy the form in Liferay, but if I give it a static value from the template it gets the value correctly... This is the formula that I have in the field of the radio buttons to calculate de value depending on the other field: *if (xxf:instance('fr-form-instance')/section-0/actuo='R' ) then 'repre' else if (xxf:instance('fr-form-instance')/section-0/actuo ='P') then 'propio' else .* Could it be because the section belongs to a template? Or if it can be done in some other way? Thank you, Iñigo -- 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]. |
Administrator
|
Hi Iñigo,
Are you saying that a field outside of the section template needs to access a value inside the section template, or is it the other way around? - If the former, you can do it by referring to the node using a path expression, like `/form/section-1/control-1`, instead of a variable ($control-1). - If the latter, there currently isn't a way to access the value of a field outside of the section template from inside the section template. Does this answer your question, or were you looking for something different? ‑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 |
Hi Alessandro,
We've solve it by assigning a value to the field from a rest service. What we wanted to do was to access the field value of a section template from within another section template. For a future, it's not possible to do it no? Thanks for your answer, Iñigo -- 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]. |
Administrator
|
Hi Iñigo,
I'm glad you found a workaround, and no, it isn't currently possible to access a field F1 in section template S1 from a formula for a field F2 in section template S2. And I'm saying "currently" because we'd like to support that case in the future. Namely, I think that implementing #2471 and #1922 linked from #3446 (see link below) would make the use case you have possible. I've added a +1 from you on those 2 issues. https://github.com/orbeon/orbeon-forms/issues/3446 ‑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 |
Free forum by Nabble | Edit this page |