Struggling with Increments

Hi All. Currently working on an app for a friend. Based on fundraising traditional coupon books they are looking for a coupon app with BOGOF offers etc. from local suppliers to be used by customers in support of their local school. So the initial layout is fine and glide works well. The customer will show the redeem coupon to the business on screen via a component button push. This coupon is redeemed and I’m incrementing the number of coupons by the business to hide the component button if it has already been used (user-specific columns). So far so good… What we would like to do is so the value of the savings by adding up all of the coupons redeemed. We have assigned each coupon a value and would like to have an amount on the profile screen but I can’t see to get it to work! Is this possible or has anybody a similar project that they’ve worked on? I’m stumped.

Is the amount user specific as well or did you want an amount that takes into account ALL coupons redeemed by all users?

1 Like

Hi Robert. Thanks for getting back. Yes ideally it would be per user. Not a deal breaker but a nice to have if its not going to impact too much on my row allowance!

If you’re using a number user-specific column to flag which coupon has been used, I assume you can do it like this.

Create an If Then Else column in the Coupons sheet. If Used equals 1 then Coupon Value, else 0.

Go back to the Users sheet, create a rollup pointing to the Coupons sheet, specifically the ITE column above, and sum it.

2 Likes

Yep. This :point_up:

2 Likes

Thanks @Robert_Petitto and @ThinhDinh. Still stumped. For some reason on the User tab when I bring the value across using the Sum it brings it across for all users!

I should be a unique experience for each user. Have you previewed as different users to see if the SUM changes?

1 Like

In the data editor or in the app itself? You may see it visualized like that in the Data Editor, but as long as the rollup is pointing to a user specific column, it will be different for each user.

1 Like

Hi @Jeff_Hager, @Robert_Petitto @ThinhDinh. Attached are my struggles! Incrementing with a button component. I’m sure it’s something obvious so thanks for your efforts and replies.

image
image
image
image

It’s hard to tell for sure, but I doesn’t appear that you have any user specific columns in your Coupons sheet, so yes it’s going to accumulate for all users. You need to create a new column that is user specific and that will be the column that you increment and rollup against to get a unique count for each user.

2 Likes

Mmm. It seems that it won’t allow User Specific (If>Then>Else or anything else) outside of basic column types).?

If an IF column refers to a user specific column, then the results of that IF column will also be user specific. Computed columns don’t need to to be specified as user specific or not. They are computed on the user’s device and don’t actually store any values. Basic columns store values and those are the ones that you can specify as user specific or not when you create them. If a basic column is not user specific, then it can only hold one value. If a basic is user specific then it will hold a different value for each individual user.

1 Like

@Jeff_Hager Thank you so much for your patience. It’s working. Focusing on the coupon page too much I’m afraid. So my solution was to tie the component value (custom action which reduces the total number of coupons, hides the redeem button) and incremented to a User specific column on the coupon page > if. then.else (to locate price) > roll up on User profile. Perfect and thanks again @Jeff_Hager @Robert_Petitto and @ThinhDinh

2 Likes