Upload a csv file and get a random output

How can I upload a csv file inside the client app storage and output a random row on a screen tap?

A few steps required, but possible! You can use Pick file to select the CSV, followed by Read file to read its contents, parse the CSV to a list of objects with some custom JavaScript, then finally use Replace client-side record collection to save the list of objects to client-side storage.

Then, you can use Get collection to get all the items from storage, and formula PICK_ITEM(outputs["Get collection"].records, RANDOM_INTEGER_BETWEEN(0, COUNT(outputs["Get collection"].records)-1)) to pick a random item.

1 Like