I'm making a dummy stock trading app. Every week, I distribute dividends to users, and I record how many dividends each user got from each stock they own in a table called Dividends (Table B). When I create a record in Dividends, I want to update the user's cash reserves, which is recorded in the Users table. Both tables are linked together via an email column. How could I implement this functionality in Appsheet? Note that I am using an Appsheet database, so I cannot use Appscript.
If you just need a SUM() of the dividends for each users, you can create a virtual column on the user table with an expression like SUM([Related Dividends][Value]). Here the [Related Dividends] column is the REF_ROWS column on the user table and the [Value] would be whatever column you are recording the dividend value on the Dividend table.
If you need to do more than this, you can add an action to run on your form whenever you add a row to the dividend table which updates the needed records, or use a bot.
User | Count |
---|---|
15 | |
14 | |
8 | |
7 | |
4 |