Se por exemplo uma pessoa compra 3 itens, é adicionado 3 linhas no banco de dados, porém elas vão ter o mesmo número de pedido.
Quero ter um grupo repetidor que mostra o número do pedido, nome e o valor total comprado. Quando faço isso aparece várias vezes o mesmo pedido, como faço para filtrar e aparecer apenas os números de pedidos sem se repetir?
Can I suggest instead you have a datatype called Order, which can then contain Order Items, that way it will make your application much more effective for things like this as well as many other things down the line.
But if I want to know how much items one specific client bought, how I do this?
Because the way you said I’ll have one line per client, so the order will receive all items that this client bought, and the quantity also will receive all the quantities of each item. So, if after I want to make a list of all items that this client bought and the quantities, how should I do?
If you also have any video to recommend, send me please.
You can also use the method “grouped by”. Your repeating group will be “Search for Orders:grouped by Pedido”.
That way each line will have a single order.
But I do agree with @Oliver-wholegraintech . By having your database better structured you can have a faster app with more possibilities for searches and data mining.
I am currently using the following structure:
-Item
Name, Price
Shopping Line
Item, Qty, Cart, Subtotal
Cart
List of Shopping Lines, Total
Order
Cart
This way I can keep track of open carts and each item and it’s quantity.
Thanks, yes I change my database, that old way were very bad for searches.
But now I have the problem that the data of this two columns are not showing in the database.
Do you know why this is happening?
Make sure you’re adding those elements through the workflow when creating them, since the new structure is different you might need to update your workflows?
Have you tried debugging while running the workflows? Go step-by-step and when it reach the time of making changes do the ‘Adicionar Vendas’ data type you can find the source of the issue.