# Add new column by certain action only when it is not existing

**URL:** <https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886>\
**Category:** Ask for Help\
**Created:** [October 7, 2024, 1:19pm UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886 "2024-10-07T13:19:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnzmrk12](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mnzmrk12/32/80789_2.png) [@mnzmrk12](https://community.glideapps.com/u/mnzmrk12)\
**Post date:** [October 7, 2024, 1:19pm UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/1 "2024-10-07T13:19:25Z")

</div>

Hi, there. I started to create an App for tools.I need to set a new column in the data sheet, when a certain action takes place. E.g. when I press a button, I want date and time stamp in the column “given away”. When the column does not exist in the data sheet, I need the app to create it. If existing, I want to use the existing “given away” column.  
I do get the Data sheet without a few neded colums and I dont want to change the data every time, I get a new excel file. So, when I press the button and the column is missing, I want the action to create it oder, if it isalready available, I want the app to use it. Hope I could make clear, what I need, I am no english natvie speaker.  
Regards Markus  
P.S.: Edited for some mistakes

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [October 7, 2024, 1:27pm UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/2 "2024-10-07T13:27:36Z")

</div>

Glide actions can not create a new column. You can create your data set with all the possible columns you can think of and then set your actions accordingly.

---

<div class="post-metadata">

**Author:** ![mnzmrk12](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mnzmrk12/32/80789_2.png) [@mnzmrk12](https://community.glideapps.com/u/mnzmrk12)\
**Post date:** [October 7, 2024, 1:48pm UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/3 "2024-10-07T13:48:19Z")

</div>

Thank you for your answer.Then I need to change the Data file in advance, before I import it. Got to get this automated then.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 7, 2024, 2:01pm UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/4 "2024-10-07T14:01:17Z")

</div>

> [@mnzmrk12](#):
>
> Then I need to change the Data file in advance, before I import it

You can also add columns to your table directly in Glide’s Data Editor.

---

<div class="post-metadata">

**Author:** ![mnzmrk12](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mnzmrk12/32/80789_2.png) [@mnzmrk12](https://community.glideapps.com/u/mnzmrk12)\
**Post date:** [October 8, 2024, 8:18am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/5 "2024-10-08T08:18:17Z")

</div>

I know that, but I wanted it to be automatic.  
Every time, new Data is provided (which comes als xls file), some columns are not included. I would have to include the columns by hand and hoped, I could just import the xls file and the columns would be added, when needed the first time.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 8, 2024, 9:03am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/6 "2024-10-08T09:03:33Z")

</div>

> [@mnzmrk12](#):
>
> I could just import the xls file and the columns would be added, when needed the first time.

That’s actually what should happen - have you tried?  
The thing is, you would still need to configure the layout to work with those new columns. That won’t happen automatically.

---

<div class="post-metadata">

**Author:** ![mnzmrk12](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mnzmrk12/32/80789_2.png) [@mnzmrk12](https://community.glideapps.com/u/mnzmrk12)\
**Post date:** [October 8, 2024, 10:31am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/7 "2024-10-08T10:31:40Z")

</div>

You’re right - I did not think about this - I cannot configure the laou without the right column. Problem not solved, but I need another way anyway 😃 Thank you!

---

<div class="post-metadata">

**Author:** ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)\
**Post date:** [October 8, 2024, 11:10am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/8 "2024-10-08T11:10:21Z")

</div>

could he transpose his dataset so that he can add the data as rows instead?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 8, 2024, 11:18am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/9 "2024-10-08T11:18:02Z")

</div>

Perhaps, I don’t know. I’d need more information to answer that.

---

<div class="post-metadata">

**Author:** ![mnzmrk12](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mnzmrk12/32/80789_2.png) [@mnzmrk12](https://community.glideapps.com/u/mnzmrk12)\
**Post date:** [October 8, 2024, 11:34am UTC](https://community.glideapps.com/t/add-new-column-by-certain-action-only-when-it-is-not-existing/76886/10 "2024-10-08T11:34:27Z")

</div>

it is then easier for me to add the columns - changes to be made are mor dificult, than just add the columns
