Transposing 2 database values

Hi Bubblers!

We are trying to build a Bubble app that would pull our Shopify orders and relay those orders to certain warehouses depending on the items ordered.

We are using a Zapier webhook to push new Shopify orders but line items and quantity is making it difficult to search the database.

So lets say a customer orders 1 Shirt and 1 Pant. Right now Zapier is pushing “shirt,pant” as the lineitem and “1,1” as the quantity.

What we want to do is look up the quantity and lineitem in the database. If both items are available in 1 warehouse, we want it to return 1 warehouse ID. If they are not in the same warehouse, we need to do a search for each item individually and return multiple warehouses.

Please see attached picture. If a customer orders 1 Shirt and 1 Pant, we want it to return 0000000000 since both are in 1 warehouse. If a customer orders 1 Pant and 1 Sock, we want the search to return 1111111111,2222222222 since they are in separate warehouses.

We were able to achieve this in Excel using a complex formula that used transpose and Vlookup but doing it in Bubble is more complex. If anyone has a better idea of how to achieve the above task, please let me know. We have been trying to solve this for some time and simply can’t think of anything else.

Thank you!

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