Clear choice with Set Value

Hi Guys.
I need your help. I have an inline list which functions as buttons. Whenever I click an item in the inline list the set value action should be activated and clear the first row of the certain column.
The problem is that it clears the row where the item in the inline list belongs to. However I need only the first row regardless the position of an item in the sheet, because I have to clear the choice selection, which is the first row of a column.
Do you have any ideas how to do it?
@Robert_Petitto I think you know the answer. Could you please help?

The way to do this is to create a single relation that links to the first row in the table that you want to clear. Then you can do the set column values via that single relation.

1 Like

Hi Darren, thank you for your reply. Do you mean that I should set value-clear in the single value column? I think you can not delete rows in that column. Glide does not support that.

Not single value, single relation.

I canā€™t see your data, so I canā€™t tell you exactly how to set it up, but it might be something like this:

  • create a template column that contains the word ā€œtrueā€
  • create a basic text column, and enter the word ā€œtrueā€ in the first row
  • create a single relation that joins the template column to the text column.

This will give you a direct link between every row in the table and the first row.
Now you can set the action on your inline list to do a set column values via that relation, and use it to change the values in the first row of the table.

That is what you are looking for, yes?

1 Like

Thatā€™s right! Thank you! One more question. Instead of ā€œtrueā€ value I have different values, because it is a choice which selects different values. How to handle this issue?

As I said, I donā€™t know what your data looks like, so I was just giving one example of how it can be done. The important thing is to create that link. The two columns that I suggested are just for the purpose of establishing the link, they donā€™t have to be used for anything else. ie. you can still use your inline list as it is.

1 Like

Thank you for your help Darren!

1 Like

What Darren said :slight_smile:

However you make it happen, you need to make a relation to the first row from all rows. What I would do is:

  1. Within the sheet you need to clear, create a single value column that grabs the First > Row ID
  2. Create a relation from the single value column to the Row ID column
  3. Use this relation in the Set Column action.
2 Likes

Thank you Robert!

yeah, that is a much better way to do it. I was just making it up as I was going along :crazy_face: :rofl:

In actual fact, when I do this I usually move the choice list to a separate table, and then itā€™s easier to create a relation to the first row with a simple current user/template column.

2 Likes

Hi, this app uses a floating button to clear choices by reseting a unique value ā€˜Parent IDā€™.