@jzuilkowski unless you’re using Zapier or Make to get subscription info from Stripe, you can’t actually use Airtable to calculate if a user is under/over their subscription limit.
Assuming you have this data, the formula should be pretty straightforward, so let’s focus on the formula assuming you don’t.
The way that I approached this was by setting a quantity of something (say, coins added to a collection) per subscription level.
Level 1: Collect up to 25 coins
Level 2: Collect up to 50 coins
Etc.
The way that you setup your formulas is:
On your users table, count the number of linked records for collected coins that are linked to the user.
Then, in another column, use a formula to bucket which tier their usage is in using nested IF formulas.
IF( {Count of Collected Coins} >= 0 AND {Count of Collected Coins} <=24, “0-24”,
IF( {Count of Collected Coins} >= 25 AND {Count of Collected Coins} <=49, “25-49”,
IF( {Count of Collected Coins} >= 50 AND {Count of Collected Coins} <=74, “50-74”,
Etc.
Then, in Softr, setup lots of user groups (this part was painful for me personally - I have over 100 user groups, lol). Example:
Tier 1 Subscription Under Limit: Criteria is Subscription = Tier 1 and Count of Collected Coins = 0-24
Tier 1 Subscription Over Limit: Criteria is Subscription = Tier 1 and Count of Collected Coins = 25-49 or 50-74
Tier 2 Subscription Under Limit: Criteria is Subscription = Tier 2 and Count of Collected Coins = 0-24 or 25-49
Tier 2 Subscription Over Limit: Criteria is Subscription = Tier 2 and Count of Collected Coins = 50-74
Why do you need so many user groups?
You’ll want to create dup copies of your blocks and make them visible to user groups that are for under/over limit users.
If block is for under limit user groups = The “Add” buttons (or whatever buttons you use) work
If block is for over limit user groups = Keep the “Add” buttons, but redirect users to the pricing page to upgrade because they’re at their plan limit
If you’re paying for a higher tier Sofr plan with button visibility you can probably get away with setting visibility at the button level instead of the block level and not having dup blocks, but this is the cost effective way to do it while your app is still growing.