Help

Re: Summarizing values from one table in another

Solved
Jump to Solution
973 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Heavy_Sound
5 - Automation Enthusiast
5 - Automation Enthusiast

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!

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

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.

See Solution in Thread

3 Replies 3

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.

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?

Kamille_Parks
16 - Uranus
16 - Uranus

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.