Jul 15, 2020 10:19 PM
I have a users table which has a user_id and points field. I have a points_events table which logs each time a user_id receive points for an action
I need the points field in the users table to sum the total points associated with that user_id from the records in the points_events table.
How can I do this? I need it to be as automatic as possible. Thanks for any help you can offer!
Solved! Go to Solution.
Jul 16, 2020 09:01 AM
If you’re referring to adding records via the API, I think Link Records fields take an array of record IDs. So this is possible, you’ll just need to do some extra work finding the record id for matching user_id
values in the users
table.
Jul 16, 2020 12:02 AM
Assuming your user_id
field in the points_events
table is a Link to Another Record type field, your points
in your users
table could be a Rollup field with a SUM(values)
aggregation.
Jul 16, 2020 08:47 AM
Thanks so much for your response! This makes intuitive sense to me, but will I be able to POST records to points_events that automatically link to user_id in the users table?
Jul 16, 2020 09:01 AM
If you’re referring to adding records via the API, I think Link Records fields take an array of record IDs. So this is possible, you’ll just need to do some extra work finding the record id for matching user_id
values in the users
table.