Can anyone help with a formula

Sorry if this is a silly question but I am new and a bit lost.

I am designing an app where people sign up for a subscription. I am offering the first 100 spots at a discounted rate. How do I show the number of spaces left?
I can do it in reverse by saying “Search for users:count-100” this returns -100 but I want to do “100-Search for users:count” to get a positive result. Has anyone got any suggestions.

Thanks :slight_smile:

Maybe “Search for users:count+100” or “Search for users:count 100” (I am also “new” so these might not be correct.

This should work. Are you running into any issues using this expression?

Tal
nocodify.com

Thank for your suggestion. Yes I did try that and it did not work. I couldn’t get the dynamic data working when I begin the expression with 100-

Thanks, Xann.
The first one will give you a positive number but after you sold the first subscription it would rise to 101 left, I need it to drop to 99. The second equation will not work and it does not tell Bubble what to do with the 100. Good suggestions though.

1 Like

try creating a hidden input with a value of 100 then in the expression reference that input - whatever etc
2020-06-09_07-16-35

Hi Bubbleboy. Thanks for helping I have tried that but I cannot get the minus symbol working within the formula. Every time I get to the end of imput A’s value I cannot add the minus symbol to join the two formula. Am I missing something?

@feedbackandreviewtoo I think Bubbleboy’s solution is correct, I got curious and tried it: https://bubble.io/page?type=page&name=numberto100&id=ambroisetestapps&tab=tabs-1
Obviously you can replace the Input Number of users on the editor by Search for Users:count

Did you set the Input’s value as Integer on your side?

Thank you. That worked. I am new to bubble and sometimes I can overlook the obvious. :slight_smile:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.