I have a endpoint setup which creates a new thing in bubble’s database, one of the parameter (item_qty) for the endpoint is set to optional. In the database I have set the default value to 1 for item_qty field.
Problem I am having is if the item_qty parameter is not sent to the API endpoint (because its optional) the new thing which is created is not using the default value of 1 for the item_qty field.
Hi @shawn.chaudhery, it sounds like what’s happening is that because your workflow includes a item_qty field update (in Create action), it’ll either save the parameter value or blank. The fact that you have the field in the workflow overrides the default set in the data type.
I bet if you were to remove the field, then it would save the default, but obviously you need the field in the event a parameter value exists.
What you can do is have an action right after the Create action that runs only when “item_qty is empty” … this action makes a change to “result of previous step,” and the change is field = 1.
Gaby at Coaching No Code Apps (formerly Coaching Bubble)
Courses & Products, Tutorials, Private Coaching, and High-level Development
Start Learning Today 
Makes sense…I will test it out. Thank you so much!
1 Like