If you are trying to create discounts, then yes you will have to have multiple fields for the data type. My recommendation is to have the following fields:
- Discount (Fixed Amount)
- Discount (Percentage)
- Type (Fixed Amount of Percentage)
- Users (List of users that have this discount)
From here, you could have a conditional statement that would check the type of the discount and then trigger one of two workflows based off of the result.
For example, when the checkout page is loaded, you could have two seperate workflows in which one would trigger based off of the type of discount that the user has.
The fixed amount workflow could simply subtract the value of the coupon from the subtotal using “Make changes to a thing.”
Due to the fact that there is not a “percentage” data type in Bubble, you would have to treat it as a number. Therefore, in the percentage workflow, a little math would be involved to subtract the percentage off from the subtotal.
I did not get a chance to fully test out an app like this yet, so this is just what I was thinking, but I’ll try to create one today and share the result with you to provide an example of what this would look like.