Forum Academy Marketplace Showcase Pricing Features

Alterar um campo baseado em informações de um repeating group

Olá,

Sou novo no Bubble e estou programando um sisteminha para controle de pedidos na minha empresa.

Preciso que o status de um pedido seja alterado para “Instalado”, por exemplo, quando todos os itens desse pedido estiverem com o status de “Instalado”.

Qual seria a melhor forma de fazer isso?

No banco de dados cada pedido tem uma lista de itens. E cada item está associado a um único pedido.

Se puderem ajudar, agradeço.

Hi there, @dibarros45… one way to do what you have described is to have a status field (which I would almost certainly tie to an option set) on both the Item and Order data types. As each item is installed, have a workflow step that sets the item’s status field to Installed. Then, have the next workflow step (or possibly a backend workflow) set the order’s status field to Installed only when the count of items on the order where the status of those items is Installed equals the total count of items on the order.

Again, that’s just one way to go about it, and I hope this helps.

Best…
Mike

Hi mikeloc,

I created a step to change the status based on the count of items, as you said. It’s working as expected.

Thanks for the quick reply!

1 Like