Hi there,
We have a button set up, that, upon clicking it, changes the values for 8 rows randomly, by pulling in data from another table.
The code that randomly selects the first value is the following:
Filter([All Shopify products],Store="the-design-part.myshopify.com").Nth(RoundUp(Random()*Filter([All Shopify products],Store="the-design-part.myshopify.com").Count(),0))
This will pull in a random value, however, the value will be the same for all 8 rows, so we fixed it by adding a different number for each row that is being updated. Ex:
Filter([All Shopify products],Store=“the-design-part.myshopify.com”).Nth((RoundUp(Random()*Filter([All Shopify products],Store=“the-design-part.myshopify.com”).Count(),0))+24)
(The only change here is +24)
However the issue with this, is that sometimes the value that is returned be outside of the total rows that are present in that table, and thus will return an error, saying that this row does not exist.
-How can we ensure that upon clicking the “randomize” button, all the 8 values are different, and are actually within the total rows of the table?
I’ve made a recording to show the issue here: https://www.loom.com/share/a3c3e9c9f74440f5a16f3cffc0751496