[Need Help] Workflow formula struggles

Hi,

I am trying to build a marketplace where if a user’s in app balance is greater than the purchase price of an item, they can but it, but if not, they are directed to Stripe to add money to their in app wallet.

  1. Is this best to do within the workflow?

  2. If so, what does the formula look like? I have put this in, but I am struggling with how to see these things and to test them…

  1. I will have a bunch more calculating to do inthis app. Where can I look to find out more about these formulas, examples, and best practices?

Thanks!!

Oh no! Unless your users are having multiple wallets for some reason, add a field of type ‘Wallet’ to your user. So, essentially instead of searching for wallets where the owner/user is the current user, we can just look up Current user’s wallet. Saves you WU, latency, headaches…

You workflow should ideally look like:

When Group Pledge is clicked and Current user’s Wallet’s balance >= item’s purchase price, run that workflow.

Create another workflow that’s when group pledge is clicked anc rurrent user’s Wallet’s balance < item’s purchase price that runs when it’s not the case.

To test it out, go to your Data tab, manually set your own balance and test with an item that you’ve created in the Data tab assuming you have no UI that does this yet.

1 Like

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