You can create an automation to push the button whenever the Fruits Table changes.
Step 2: Given a Row Number, generate a unique combination
Before getting to the math part, we have to deal with the fact that RowID() is a great formula, but it is monotonically increasing - so if you delete rows, you will have gaps. So you'll notice that the
Solution_suvMc#Unique-Combinations_tuYRq
table has a column called N which gives a ordinal number to each row with no gaps:
N:Rank(thisRow.[Row ID],thisTable.[Row ID], true)
Next we need to generate the unique combination for each value of N. The basic idea is to do it numerically first (with columns i, j, and k) and then use those as indexes to pick the i-th, j-th, and k-th fruits from each of the small, medium, and large sets. So for the math-y parts, here's how i, j, and k are calculated.
--> The idea here is for every Medium fruit, you need Large.Count rows
--> And for the Medium sets, you want to rotate through the set for each of the Small fruit rows
--> So the Remainder() formula [known as mod in math speak)] does that iteration
k:thisRow.N.Remainder(@Large.Count)+1
--> Finally for the Large fruits, we just need to rotate the number of Large fruits
--> So we can use just the remainder formula here, and it will give us one row per Large fruit
After that, the Small, Medium, and Large columns are simple indexed lookups
Small: @Small.Entries.Nth(i)
Medium: @Medium.Entries.Nth(j)
Large: @Large.Entries.Nth(k)
One quick sidenote that you might have noticed is that you can get a particular "cell value" from a cell by typing @rowname.columnname. This can be handy for lookup values like @Small.Count
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (