Choice component default

Hello Glide community.

Here is my latest conundrum. I am wondering if the Choice component can have a default choice other than “blank.”

Scenario: I have a Supply Order Form in my app and one of the options is to view the status of the order. When an order is submitted the first time, the default choice would be “Under Review,” to allow the person processing the order to look at the order and yada yada. Then the choice could be changed as the order is being processed, yada yada.

Suggestions? Feature Request?

I’d run a timed trigger to execute a script that would populate that column with your default if it was found to be empty.

1 Like

I tried that and I did not get the desired result. I think I forgot to mention that the user would be submitting a form, so the row in the sheet has yet to be populated.

I found a way around this. In my app I created a new column in the Data section named “1stTimeOrdered.” I then use the If/Then/Else component to check if there is a new entry. Since the Order Status column in my sheet would be blank, I told it to put “Order Under Review.” Then I added a Basic text component to show “Order Under Review” based on that special column. I also created a Choice component in the Edit area of the same sheet so that the Status could be changed based on a list from another sheet. Once I finish editing the row in the app, the Basic Text component turns to ghost because the If/Then/Else component would return a blank. and the Choice component shows up in the Details view.

I hope I explained it correctly…excitement comes over me when I find a way out of my own predicament.

3 Likes

What an elegant solution to what seemed to be a problem. I like the way your brain thinks.

1 Like

I can’t seem to find any reference to a choice or favourite component, or any type of component, in my setup. I must either be blind or something has changed in the past three days.

Thanks. I see that the means of accessing these options has changed a bit.

In order to even see the Components section you need to first select one of your items such as staff member or product.

Then, to see special component items beyond those auto-generated, you need to click the + icon.

That’s where you can make the secret magic start to happen.

1 Like

Be nice if there was a Glide API for making custom components… :smiley:

3 Likes

I’m guessing there still isn’t one?

Hi @Carlos_DeSilva , sorry can you help me? I tried many times but I still don’t know how to set a default value in the choice component.

You can’t set a default value in a choice component. Especially in a form. If you have a choice component on a detail page, then it’s going to display the selected value in the sheet.

3 Likes

I see. Thank you for the answer Jeff. It’s a kind of relief since I’ve been wrecking my brain trying to figure this out.

1 Like

How about put default value in that column.

2 Likes

I currently have a similar issue but related to how the status populates when using a CHART component. I have 3 choices in my choice form: 1) Implemented or 2) Tabled. When one of these is selected, it writes to the column in the appropriate sheet. Until the choice is made, the field is empty so the Chart only shows the states that are selected. SO I want the empty fields to be replaced with “Unassigned”. A chart will only pull data from one column (Data Label); So writing to a second column won’t help in my case. Thoughts?

Correct then that there is no workaround to putting a value that will show in the chart alongside the choice selections?

Here is a little 2min video that shows my issue. https://www.loom.com/share/bc75085312e44c23889e841fb9f073be

@Deena You can create a new if-then-else column, Have the condition say If “State Cloumn” is “Not Empty”, Value = “State Column” Else Value = “Unassigned”
Then use this new column in your charts.
Let me know if it works.

3 Likes

Hi! I am trying a usecase with the Choice component where the user selects a value from the dropdown list and based on the value a video will be played. I have created a lookup column for this, but I am unsure how to go about this. Help please?

If you have the lookup already, you can add a video component and point to that lookup column.

I created a lookup column and under configuration, selected the video component. But I am sure I am doing something wrong, because after I select my choice from the drop down, it just stays. Doesn’t display the corresponding video link.