I am adding a voting component to my app. I have a page to create a vote ‘motion’. I have a default vote choices of “In Favour” / “Against” / “Abstain”. but the admin can also create a set of choices, like “Red” / “Green” / “None” with no theoretical limit on # of choices.
I thought of having 5 columns for up to 5 vote choices, but that seemed clumsy and didn’t resolve my problem anyway (see below). I have a toggle to use the standard vote options:
My problem is, how do I use that comma-separated list as the source for my Vote buttons?
I can’t seem to use either a plain comma-separated text field as all the values appear as one button. Nor can I select an array to use as the source. The Choice component only seems to want table rows from a single column:
Hmm, the video’s interesting but I’m not sure how to apply in my case. I don’t have the list of items in rows anywhere. They’re only ever in one text field. I’d rather not make a column somewhere to track the list of options for every poll / motion we want to vote on, right?
The goal is to have a set of Choice options from that single text input. Here’s how it shouldn’t look:
The idea is to dynamically generate the list by first creating an array from the list, then using a Helper Table with a row index, and finally a Single Value column to select each item from the array on a separate row. Bob’s original video maybe doesn’t explain this as clearly as it could - it was made a long time ago.