Dynamic default - Choice component

Hi all,
I’ve seen many posts about defaults on Choice components, but couldn’t find a discussion about the dynamic nature I’m looking for.
Example of a use case:
App will have a couple of messages it’ll want to send to the user (new order, shipping problem, etc).
App will allow a user to receive a message in various channels (WhatsApp, SMS, email, etc).
For each such message, a different default channel will apply. For example, shipping problem will have a default of SMS, while order confirmation will have a default of email.

So where’s the problem you ask? :slight_smile:
How do we allow the users to “override” the default channel, while still using a single component for what channel should be used for each message type. The choice component for “Channel” should have a pre-ticked option based on the default for that particular message type.
I do not want to use a seperate component such as “override default”. Filtering out the default will also look bad and cumbersome to the user. The user should be able to simply untick the channel that was ticked as a default.
We will of course make sure we still have at least one channel per message type, being the default one of not.


Set your defaults as part of the action that navigates to the screen.

But I can’t…
Choice component A is the one which dictates what is the default for Choice component B.
Is there a workaround by, perhaps, using an ITE column? The problem is that such a column cannot feed into the choice component.

Do you have some screenshots of what your flow look like? Why can’t you set your defaults as part of the action that navigates to the screen like @Darren_Murphy said?

Sure. Even better, here’s a demo app.

In this example, the main dish has a default side dish


Once you select your main dish, the app should know which side dish to suggest as a default.


Why are you using user specific columns for your choices?
Those columns will be completely empty by default for all users. To fill them with data, you’d need to “view as” every single user in the builder once, and type the values in.

Anyway, I’ll have a look.

Using the “custom form” approach suggested by you :slight_smile:
Same form to be used by multiple users, at the same time.

Oh…Now I see what you mean. That’s a mistake. Prepared this example in 2 min and there are some casualties.
USC or not, it doesn’t solve the default choice issue.

Choice components can be writing to user specific columns, but they almost never should be reading from them.

Indeed, a mistake on my side. Should be non-USC.
For the sake of this question, it doesn’t really matter. Even for one user I don’t know how to manage this issue.

Before I look at this, I have a question.

In your demo app, you have your choice components on the first screen in a tab. Is this how it works in your real app, or are they hidden on a screen somewhere within a tab?

That is, does a user open a tab and this is the first thing they see, or do they tap on a button or some other actionable component to see this screen?

I don’t think this is possible. The problem is that you can’t assign an action to a choice component, and so there is no way to set the value of the second choice based on the selection in the first.

If you wanted to set a default for the first choice, that would be possible as long as you have an action that navigates to the screen.

But for this particular example, I think the best you can do is “make a suggestion” based on the first choice. Something like the following:

you have to create a table with default choices that will be written to choices components (USC), when users go to that screen … very simple :wink:
I did many delivery apps … trust me… is all about how you structure the data, then everything will make sense and be easy… and don’t even think about using Glide native forms or edits… all have to be custom… even choice components custom… made from inline tiles list… you need to have a full control of what is going on, and have a ability to apply actions for every step your customer will make. choice component… form… edit… will not give you that option.

Button, or another component that is assigned an action to “open a new screen”. However, both choices are in this new screen, so pre-filling with an action isn’t possible.

I’m not sure I follow but I believe you’re suggest the same solution as @Darren_Murphy. If so, that’s not what I’m looking for. I don’t want to have the users switch between screens. All has to be in one screen.

That’s a direction I haven’t thought about. May I ask for more details?

Answering myself, I think I now understand.
That’s ingenious!!

Adding another screen recording to show the changing values


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