Does anyone know how "Random Picker" removes duplicates?

As part of a series of educational apps I’m using random choice from a list to serve up speaking tasks to English language learners. One annoying aspect is that students are served up with tasks that they have already seen in any one session. The shorter the list, the more frequently that happens. Because of the length of some of the strings, lack of text wrapping and styling capabilities, Random Picker isn’t up to the job. But the Random Picker component has a built-in function to remove duplicates from the list. Does anyone know how that is achieved?

I came up a method to remove prompts or questions or players or whatever I’m displaying once they have been used by changing a logged in user value and filtering for it. I also found a way to reset the list using @Victor’s Timer Tricks. The problem is, say I have a list of 50 items to choose from randomly. If item number 24 is displayed and removed from the list, sometimes the random function will choose number 24 even though it doesn’t exist in the list any more. Then the output is blank.

The count used by the RAND function is still 50 even though the list itself only has access to 49 items. I need to come up with a way to remove an item from inclusion in the random function dynamically. My math skills are way rusty but it seems like some kind of array or matrix function might be up to the job. Is that even possible in Adalo?

The creator of Random Picker obviously found a way around it but is no longer active in Adalo and doesn’t respond to contacts made through social media. Any thoughts?

According to @njimmy10, who contacted me behind the scenes with an offer to make a custom component:

Blockquote “When it comes to selecting items from a list, but without duplication. I am sorry but it’s not doable within Adalo basic elements. Especially because you cannot access list length too”

Yes that’s true, the component will always have access to the list item, and it will choose one item from it with no duplication.

It’s not about

A way around it. He just coded a component which does that, but hasn’t included in his code a way to remove duplication and do what you want to do.

@njimmy10: Random Picker DOES include a way to remove duplication. It has other shortcomings which make it unusable for anything longer than 4 or 5 words.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.