Problem with calculated field after updating to orbeon PE version

65 views
Skip to first unread message

Jaanus T

unread,
Aug 2, 2022, 7:25:47 AM8/2/22
to Orbeon Forms
Hello,

I am facing issue regard one calc expression on bind after updating to Orbeon PE.
Before I was using:
        tag: "tag-release-2021.1-ce"
        build: "orbeon-2021.1.202112312237-CE"

After update I am using (actually 1.3, but just now updated to 1.4 and same issue):
       tag: "tag-release-2021.1.4-pe-pseudo"
       build: "orbeon-2021.1.4.202208011854-PE"


Problem is when I try to output some calculated value and in calculation is used value from another calculation, example:
<xforms:bind id="bind21" nodeset="total" calculate="sum(../../ApplicationRows/Row/(if (string(number(replace(sumNoCalculation, ',' ,'.'))) != 'NaN' and
  (Liik!='L' and Liik!='P')) then number(replace(sumNoCalculation, ',' ,'.')) else if (Liik='L' or Liik='P') then number(sumCalculated) else 0))" type="xforms:decimal" />
 
  (total is sum of all the applications, sumNoCalculation and sumCalculated is used
in repeat )

Field sumNoCalculation is working fine, but with sumCalculated I can see that sum is calculated correctly, but total value is 0.
Field sumNoCalculation is declared as:
    <xforms:bind id="bind32" nodeset="sumNoCalculation" relevant="matches(../Liik,'V|O|A|T|I|K|J')" constraint=".='' or matches(.,'^[0-9]+([.,][0-9]{1,2}){0,1}$')" type="xforms:string" />

Field sumCalculated is declared as:
    <xforms:bind id="bind33" nodeset="sumCalculated" relevant="matches(../Liik,'L|P')" calculate="(some calculation)" type="xforms:decimal" />


To be more clear I made some pictues as well:
With PE version:
peVersion.PNG
With CE version:
ceVersion.PNG

Also I noticed that it calculates the sum of previously added rows correctly if I will add new row/rows to table on PE version (still missing calculus from latest row):
 peMultible.PNG

Can anyone suggest what should I do to fix this issue?

Jaanus

ebruchez

unread,
Aug 3, 2022, 7:20:03 PM8/3/22
to Orbeon Forms
Jaanus,

One thing that comes to mind is that one of the PE-only properties is somehow enabled by default, but I am not sure which one it could be!

Can you try adding, to your `<xforms:model>`, the following attributes:

- xxf:expose-xpath-types="false"
- xxf:xpath-analysis="false"

where `xxf` is mapped as `xmlns:xxf="http://orbeon.org/oxf/xml/xforms"`.

If that doesn't make a difference, can you build a simple, self-contained reproducible case?

-Erik

Reply all
Reply to author
Forward
0 new messages