04-28-2017 09:11 AM
Dear community.
Having a dynamic table like this ..
Quantity | Activity | Unit | Amount | Total |
---|---|---|---|---|
3 | Consulting Project A | hour | 50 | 150 |
1 | Consulting Projekt B | hour | 120 | 120 |
2 | Consulting Projekt C | hour | 30 | 60 |
.. I managed to calculate the "Total" column automatically using the formTableFieldValueChanged event.
Additionally I'd like to display to total sum (column "Total") of all rows in a separate text field. In this example the total sum should be 330.
I probably would use the formTableBeforeComplete event that gives me the "field" parameter. With "console.log(field);" I learnt the structure of the dynamic table but fail to read the "value:Array Object" construct:
Methought that someone has done this before and could give an example how to read the values of a dynamic table content.
Best regards
Marco
04-28-2017 02:37 PM
Since you already have the whole "scope" available, you can pretty much do anything you want! Just go through the scope object (console.log) and find the things you need and apply any logic you want! I just happened to have something similar to meet your needs at my end - see attached. Hopefully this is something you are looking for.
Cheers,
Ciju
04-28-2017 02:37 PM
Since you already have the whole "scope" available, you can pretty much do anything you want! Just go through the scope object (console.log) and find the things you need and apply any logic you want! I just happened to have something similar to meet your needs at my end - see attached. Hopefully this is something you are looking for.
Cheers,
Ciju
Explore our Alfresco products with the links below. Use labels to filter content by product module.