Hi @Pedro_Tovar, it’s a bit tricky when you have to do the splitting on both lists.
Maybe the simplest way would be to start off with a MAP
+ SET_KEY
– you transform both lists, so that each item’s id
property is set to the value of SPLIT(item.id, "/")[5]
:
MAP<payment>(data.payments_pending1, SET_KEY(payment, "id", SPLIT(item.id, "/")[5])))
MAP<shipment>(data.new_shipments1, SET_KEY(shipment, "id", SPLIT(item.id, "/")[5])))
Now that the ids have been reformatted, you can use the lists in the original formula:
SELECT(<payment list>, FIND_BY_KEY(<shipment list>, "id", item.id).status === "Pendiente de pago")
So finally it becomes
SELECT(MAP<payment>(data.payments_pending1, SET_KEY(payment, "id", SPLIT(item.id, "/")[5])), FIND_BY_KEY(MAP<shipment>(data.new_shipments1, SET_KEY(shipment, "id", SPLIT(item.id, "/")[5])), "id", item.id).status === "Pendiente de pago")
which is a monster of a formula, but it should work!
Let me know if there are any issues with the aliases etc.