Limit column data set size?

Is there a way to limit the number of random values for a given field? For example if I want to create a table with a first_name column, but I only want about 25 unique first names within the table, is there a way to specify that? I don’t care what the names are, just that the set is limited. Same with fields like city or country. I don’t want a table with 200 different country names or 2000 different cities. I want a table with 1000 rows but only 12 different countries and 50 different cities within it.

It seems like it would be easy to put a simple ‘Max’ spin button next to each set and let the user pick a value. For example if the ‘City’ column had a set of 1000 unique city names, it would let you choose a number between 1 and 1000. If the user chose 25 for example, it would pick 25 of the 1000 city names at random and use that subset to generate random values for the table.

Andy, did you ever find an answer to this question? I’m looking to do the same thing.

My workaround is: to first generate the “selection”-dataset, save it (in my example as: “Names”) and then use the “from_dataset”-method in a formular field with the random-method for the index.
My example with three distinct names: Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel and Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel

1 Like