Hi everyone,
I’m working on a points-based system for my app and I’m hitting a wall. I need to update the point balance for two different users when a button is clicked in an ‘Ad’ detail screen:
The Author of the ad needs to receive/lose points.
The User who clicks the button needs to receive/lose points.
I have successfully captured the ‘Clicker’ email in the Ad row using a ‘Set column value’ action, but I am struggling to increment the points for both parties simultaneously without the action affecting the wrong row or causing conflicts.
I currently have relations set up, but the workflow keeps modifying the same row or failing to target the ‘Clicker’ user specifically.
I cannot use ‘User-specific’ columns for this, and I want to avoid complex ‘If-else’ conditions that break the button visibility.
Does anyone have a clean, scalable way to handle two-way point updates in a single workflow? Should I be using a separate ‘Transactions’ table for this, or is there a way to trigger updates across two relations effectively?
Any advice on the architecture would be greatly appreciated. Thanks!"
You could use a Manual Trigger server side workflow.
- pass it 4 values:
– User 1 email address
– User 1 points adjustment value
– User 2 email address
– User 2 points adjustment value - within the workflow:
– Query the users table, filtering by User 1 email address
– use Set Column values (or increment) to make the adjustment
– Repeat the above two steps for the second user
Thanks for the suggestion! Unfortunately, I’m on the free version of Glide right now, so server-side workflows aren’t an option.
Here is my full structure, my tests, and the specific targeting issue I’m facing:
In my “Listings” table, I already have the email address of the person who created the listing.
I set up cross-relations: one from Users to Listings, and one from Listings to Users. But that isn’t enough.
I tested a combined action group (Custom Action) triggered on click:
The first action captured the email of the person clicking.
The second incremented a value for the person who created the listing.
The third decremented a value for the person who clicked.
The problem: Both increments happen on the same row (the first row). When the clicker’s email is captured, it gets forced into the first row of the table instead of finding its match and landing on the row corresponding to their profile in the Users table.
What I’m trying to achieve:
I want the captured email of the person clicking to immediately find its match so it lands on their own user row, allowing my condition to apply the +1 in the right place.
How can I force the email to find its corresponding row on the client side using an action?
You can do this by directly targeting the User Profile row of the signed in user. No need for any relations.
A huge thank you to you! Your method worked perfectly. By targeting the ‘User profile’ row at the very top of the sub-menu directly, rather than following a relationship, I managed to get round the problem. The email and the point are finally being recorded on the correct row for the logged-in user without affecting the rest of the table. Thank you for getting my project back on track!