Problem with a lists

Hello everybody! I’ve been racking my brain for weeks about how to deal with the lists. I have a problem.

I have lists of the following type

product 1, product 2, product n…
quantity 1, quantity 2, quantity n…
total price 1, total price 2, total price n…

I want to send a list of this type to whatsapp:

product 1 x quantity 1 = total price 1
product 2 x quantity 2 = total price 2
product n x quantity n = total price n

total: 3 products worth total price

I tried to do this through
1 way (do a search product item# 1 do a search quantity item# 1 do a search total price item#1)
2 way (arbitary text)
3 way (create new data base with only result and create a list from them
but when forming a list, if there are fewer products than the list itself, empty rows remain, and I want the list to be without empty cells
what else should I try?

I had a similar need on my app last year - what you’re seeing is the problem of using multiple lists, which isn’t very accurate as one value in a list changing doesn’t affect the other lists.

What I would recommend doing instead is creating a new data type, something like ‘LineItem’, with 4 fields: 1. Type Product, 2. a number field for Qty, 3. a calculated number field for that line’s subtotal, calculated using: This Product’s Price x Qty. None if these fields should be a list, and 4. Type Quote (or whatever data type you are using to generate these totals), which should be the quote the line items are created for

Now on the Quote, you’ll have a field that is a List of LineItems. On your repeating group, have it display Current Quote’s list of LineItems.
Dealing with a list of LineItems which will be much easier to handle in the long run, especially as you can calculate changes per line. If Qty changes, you have a workflow that does Make changes to a thing, type LineItem, this LineItem’s Subtotal and recalculate from there.

I hope this helps, at least to point you in the right direction!

1 Like

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