I am using my User database as the customer database. I created a new field in User which is Orders, which takes a list of orders.
Flow:
So when customer creates an oder, the order is then added to the order database. The oder will also contain the user’s email. I then want the unique ID of the newly created order to be added to the current customers Order’s list.
Question:
How do i retrieve the order’s uniquie ID. What I tried is make a change to current user-> do a search for ->order = abritrary text (current user’s email) → return first item
Is the only way to search is do a search? Is this the current method? Once it does a search and return, how do i access its unique id?
If you create the order in step1 for example, then in your make changes to the current user action, all you need is to update the orders field and add: result of step1. You don’t need to worry about the unique id. Bubble will handle it.
It is not needed but If you really want the unique ID of the recently created order, you can do the same result of step1 (assuming you create the order in the first action in the workflow.
@hergin , thank you for your reply.
My workflow is clicking button → create a new order (where i create a new order and fill the property fields of this) → make changes to current user → orders → add. How do I add the result of the previous step to it? I do not see this option available in drop down. How do i get the result?
@hergin , ah thanks I see, I am able to add Result of Step 1. I then checked the database and it adds the unique ID to the list of Orders. Just curious is this what is suppsosed to be added when we have a type “list” for database? Not the entire Order object added to the database?