How can I perform addition and subtraction operations between text fields within WSP
for example: Text field 1 + text field 2 = result in text field 3
Sorry - there is no "add this field to this field" operator in Web Screen Painter.
You'll need to write some simple SPL code which will take the values of the variables and add them together.
The easy part is the addition - you can use the standard Arithmetic Operators used here:
Where can I find Spel functions documentation?
CAUTION: This will involve going into the Source tab, which will move this into being a site supported customisation.
You will need to perform your addition and assign the result to a variable name, and then display that variable. Optionally you can create a custom form field on the table so that the value is retained.
Here is an unrelated code customisation query, but it will give you a taste for what can be done with a function.
Calculated Column in a list form? (12.6)
Does someone else have a simpler way of explaining this?
little addition: actually there is "add this field to this field" operator in Web Screen Painter presented and it's called DERIVED field but I found only one scenario where this type of fields are really needed.
Brayan, if you share your possbile usage scenario, we can suggest you customization way based on your needs.
Great comment. Always something new for me to learn!
(That "DERIVED" field type is spectacularly under-documented. Main reference here:
How to Modify Schema Using Web Screen Painter - CA Service Management - 14.1 - CA Technologies Documentation )
Will wait for Bryan to come back with details of the scenario.
Retrieving data ...