Dynamic Choice Component Help

I am making a volunteer management app and I’m really super stuck.

Here’s the scenario:

And educator creates an opportunity named “Teach kids Gooder” that is available Monday, Tuesday and Wednesday.
The educator selects those days via the choice component set to accept multiple choices using radio buttons.
The list of weekdays is in it’s own glide table named “choices”

When the educator submits the opportunity, all the info is saved to the “opportunity” glide table. The days are saved in the “days” column and look like this: Monday,Tuesday,Wednesdy.

I then created a submission form from a button and in that form I have a choice component that pulls from the “days” column in the opportunity glide table. But when a the volunteer looks at the days to try and select one, they get groups of days, and all of the groups for that table, not just what is available for that opportunity, and they are not able to select a single day.

So I added a split column, thinking that the choice component would be able to pull the individual days from the split column, but it doesn’t even show as an option. So now I’m trying to figure out some ridiculously convoluted method to just display the days available per opportunity and allow the user to select the days individually.

I’m just wondering if I missed something really simple and if someone could help me out that would be utterly amazing.

TIA,

Aaron

Choices are always based on rows, no matter what. With that said, add a relation linking your split text column to your choices table. Then source your choice component from that relation.

1 Like

I really appreciate that help.

I did what you suggested. However, when the result from the relationship is only a singular day, I am expecting three days, at least from the first row. I suspect I could transpose the weekdays and give each day it’s own column, but the relationship column would still only be able to relate to one day at a time. What am I missing?

Pictures below show the set up.


*Match Multiple

That’s what I was missing.

1 Like

Adding instructions from GPT, for the next guy that is slogging through this.

Key Concept: Choices are Based on Rows

In Glide, a Choice Component needs to be sourced from rows in a table. It doesn’t work directly with arrays (like your split column). What the expert suggests is creating a relation between your split text (array of days) and a table with individual rows representing those days. Here’s how to do it:


Implementation

  1. Create a Days Table:
  • You already have the “choices” table with a list of weekdays (Monday, Tuesday, Wednesday, etc.).
  • Ensure each day is represented as a single row in this table.
  1. Set Up a Split Text Column:
  • In your Opportunities Table, use the Split Text column to break the days column (Monday,Tuesday,Wednesday) into an array.
  1. Create a Relation:
  • In your Opportunities Table, create a Relation Column.
  • Link the Split Text column to the Name column in the “choices” table.
    • This will match each day in the split array (e.g., Monday, Tuesday) to the corresponding row in the “choices” table.
  1. Use the Relation in the Choice Component:
  • In the form, configure the Choice Component:
    • Source: Use the relation created above.
    • Display As: Show the “Name” column (or whatever column holds the weekday name).

How It Works

  • When the volunteer opens the form, the Choice Component will dynamically show only the days related to the selected opportunity (from the days column).
  • Because the Choice Component is sourcing its options from rows (via the relation), the split column’s data is effectively converted into individual, selectable rows.
1 Like

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