# Set array column action using a position index

**URL:** https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670
**Category:** Ask for Help
**Created:** [January 4, 2022, 11:22am UTC](https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670 "2022-01-04T11:22:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bachelet\_Share\_App](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bachelet_share_app/32/36022_2.png) [@Bachelet\_Share\_App](https://community.glideapps.com/u/Bachelet_Share_App)
#### Post date: [January 4, 2022, 11:22am UTC](https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670/1 "2022-01-04T11:22:00Z")

</div>

Hi,I have an array column, made using Google Sheets (5 columns with the same name+number) and I also have a simple number column which tells in which of these position of the array I have to operate.  
What I’d like to do is automatically populate the column that the index column says when I press a button. The problem is that the set column action sees the array as 5 separeted columns and I have no idea on how to indicate which one I want to fill.  
I hope you can help me. Thanks!

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 4, 2022, 1:17pm UTC](https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670/2 "2022-01-04T13:17:34Z")

</div>

Create a custom action with an IF statement that looks at you simple number column and fills the appropriate individual array column. You should end up with 5 separate IF branches, each with a set column action for the respective column you want to set.

---

<div class="post-metadata">

### Author: ![Bachelet\_Share\_App](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bachelet_share_app/32/36022_2.png) [@Bachelet\_Share\_App](https://community.glideapps.com/u/Bachelet_Share_App)
#### Post date: [January 4, 2022, 1:23pm UTC](https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670/3 "2022-01-04T13:23:12Z")

</div>

Thank you, what I hadn’t noticed was that by clicking on “else” I could have turned it into another condition!

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [January 5, 2022, 1:23pm UTC](https://community.glideapps.com/t/set-array-column-action-using-a-position-index/36670/4 "2022-01-05T13:23:32Z")

</div>

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