-
Type:
Story
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Component/s: Forms
-
Epic Link:
-
Sprint:Forms #38 - Mar 20 - 31, Forms #39 - April 03 - 14, Forms #40 - April, 17 - 28
Goal:
- Allow mathematical operations using Forms interface.
Users:
- Form Builder
Benefits:
- Increase forms personalization performing mathematical operations with values provided by the form user;
- Display the result from mathematical operations into a form.
User Story:
As a form builder, I would like Forms to support mathematical operations between fields to allow the form user to perform calculations using the Form interface.
DOD:
- Perform the following arithmetical calculations between fields:
- Addition
- Subtraction
- Multiplication
- Division
- Allow values typed into fields to be part of the mathematical expression (i.e.: I could multiply a field named "Quantity" with another named "Price");
- The form builder should be allowed to choose the target field (which will display the result of the mathematical expression defined by him/her);
- Display constant values to the form builder (from 0 to 9);
- It should be possible to build the operations either using a visual calculator with the arithmetical signs and values (from 0 to 9)
or inputing with the keyboard; - Support operations with a field linked with a Data provider (i.e.: a field that brings a USD conversation rate).
Use Case:
- As an admin analyst, I would like to use Liferay Forms to build a reimbursement app, so that I can perform calculations, currency conversions
and establish expenditure limits.- One of the cases is to set a limit of value: if a value is greater than 80, set 80, if less, then display the result of the expression. -
For this story, consider: Quantity * Value = TOTAL
This is a small excerpt from the use case, we are going to deliver in this story a line of the total reimbursement system, because the total one will need repeatable values.
Product Design references:
- Invision: https://liferay.invisionapp.com/share/C5AVMQMXQ
- Zeplin: https://zpl.io/ZhGYF6