In the below doc, on the Guitar Chord Trainer page, each time the Update (btn_UpdateChord) button is clicked, it updates the txt_CurrentItem text control with a random item from the Chords table (see the Data page). The button uses the RandomItem() formula to do this.
1. Filtered items
How can I get the RandomItem() formula to only include the Chords table’s filtered items, rather than all its items?
(I’ve managed to filter the actual Chords table the way I want - with an interactive filter based on the mlt_SelectedNotes and mlt_SelectedVariations multiple select controls (see the Guitar Chord Trainer page). However, it doesn’t alter the behaviour of the RandomItem() formula that uses the table as its input.)
2. Alternative trigger
Is there a way I can get the random items that appear in the txt_CurrentItem text control updated via some sort of timer, instead of via the user clicking the btn_UpdateChord button?
The idea would be to create something like this Countdown timer with action in the end. But, instead, when the countdown gets to zero:
- The txt_CurrentItem text control is updated with a new random item, AND
- The countdown restarts (i.e. it cycles through continuously until interrupted).
Then there could be another button to cancel/end the countdown.