D
deko
I have a form where users can select any number of transactions from a
datasheet. As they select the transactions, a coma separated list of
Transactions IDs is created, like this:
3349, 3221, 503, 30, 21893, 8320,
Each Transaction ID has a corresponding currency "Amount" in the
Transactions table. I need to calculate a total value for all selected
transactions.
I thought about keeping a running total as the selections are made, but the
list can be edited (in a text box) before the "Calculate" button is clicked,
so that doesn't work.
Can I somehow put the list into an array and sum the array? Or build a SQL
string and execute a SELECT SUM query? Do I need to use regex here? Other
ideas?
Thanks in advance.
datasheet. As they select the transactions, a coma separated list of
Transactions IDs is created, like this:
3349, 3221, 503, 30, 21893, 8320,
Each Transaction ID has a corresponding currency "Amount" in the
Transactions table. I need to calculate a total value for all selected
transactions.
I thought about keeping a running total as the selections are made, but the
list can be edited (in a text box) before the "Calculate" button is clicked,
so that doesn't work.
Can I somehow put the list into an array and sum the array? Or build a SQL
string and execute a SELECT SUM query? Do I need to use regex here? Other
ideas?
Thanks in advance.