How to set a specific value as default value for choice?

I have a choice component and I want it to have 1 as a default value selected.
In the setting I want, 1 is already selected and if I add row I want 1 is added in that column.
Is there any fuction in Glide for this?

Thanks!

Hola @YOUNGMIN

On the setting panel of the choice component you will find the default value option.

I’m not close to a computer at the moment. If anybody else doesn’t provide a screenshot of it, I will later today.

Hi Santiago!

Seems like it only exists in form setting. Can’t understand why it is designed this way. Glide is really a useful tool but I can’t understand why they don’t allow a flexible form or screen.

They do have reasons to do it that way, in my opinion.

What if you use a default value for a choice component outside of a form environment, and point to a wrong column, mistakenly delete all the data of that column and overwrite the default value to it? I don’t think many users will be happy with that.

Custom form is a workaround, so you have to use set columns to set default values.

2 Likes

Depending on what you’re doing, you can use an if then else column.

If x cell is empty then x value.

2 Likes

I think this is a useful and consistent setting to add to the choice component when used as a menu or filter. I have sections of a screen that I show based on the choice and sometimes my users get lost as to why they don’t see the same starting screen (filtered list, etc) when they navigate there. It’s persisted, I understand, but this would be a nice feature if you want the alternate behaviour.

Can you not reset to a default state as part of the navigation action?

Choice Component:

  1. If you are in Add Form, Then you have Default value.
  2. If you are in Edit Form, Then you don’t have Default value.

This is what i just found now. :grinning:

Yes, because if you have a default choice for an edit screen then it may adjust your existing choices against your will.

1 Like

I am really want to show a choice in a form to be shown to the user but it is not editable, some kind of what called in appsheet “Edit if”. The edit should be based on the user setting role.

I hope i could do that. If you kindly know a way of doing that, would be greatly appreciated.

The choice component doesn’t work like that. Best you can do in that case is use CSS to make the choice component appear disabled and non-interactive (the CSS is in a rich text that has the “edit if” condition).

For a drop down choice component:

<pre><span><style> 
[data-test="app-picker-button"] {
    opacity: 20%;
    pointer-events: none;
}
1 Like

Thank you so much for that, i will try to see where can i write these lines.

Appreciate your kind reply and effort. :green_heart: