Need first word of my custom list to be static, is it possible?

Hi All,

I have a need where my first value of a custom list needs to be static, ‘sequential’ and ‘cartesian’ options seem not working.

EX: Here is my custom list for a field where I need “Food and Drink” to always return first

categories[4] = [“Food and Drink”,“Restaurants”,“Cuisine name”,“Family”]

my desired output should be as follows

[“Food and Drink”,“Restaurants”,“Cuisine name”,“Family”]
[“Food and Drink”,“Cuisine name”,“Family”,“Restaurants”]
[“Food and Drink”,“Restaurants”,“Family”,“Cuisine name”]
[“Food and Drink”,“Family”,“Restaurants”,“Cuisine name”]

“Food and Drink” should always return first, Is it possible in mockaroo? Any help is highly appreciated.

You can use a Formula, have the “Food and Drink” as the first item in an array, then take a sample of the three items you want to add (this shuffles the input values) and add them to the first array.

["Food and Drinks"] + ["Restaurants","Cuisine name","Family"].sample(3)

1 Like

Thanks a ton…! It worked.