Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using ConfiForms Rule and the formula like 

Code Block
total=([entry.p.transform(price).join(+)])

to calculate the sum for the order

See more about transform function on Virtual functions page


ConfiForms Form Definition
formNameprices
 sash


productproducttext

pricepricenumber

Rows in prices form

ConfiForms TableView
formNameprices

product

price

...


Try checking the "p" field - the amount is recalculated.

...

ConfiForms Form Definition
formNameusingprices
true

 


pp[12223323|prices|product|true||]smartcheckbox

totaltotalread_only

total=([entry.p.transform(price).join(+)])Set expressionp

Storage format for calculation rule

Code Block
      <ac:structured-macro ac:macro-id="e9724371-0213-48a9-8e1c-6184f4b4e439" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="values">total=([entry.p.transform(price).join(+)])</ac:parameter>
        <ac:parameter ac:name="action">Set expression</ac:parameter>
        <ac:parameter ac:name="actionFieldName">p</ac:parameter>
        <ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
       </ac:structured-macro>