# Adding Multiple Rows from Text Entry Lines with a Single Button Press in Glide

**URL:** <https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227>\
**Category:** Ask for Help\
**Created:** [November 27, 2024, 12:41pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227 "2024-11-27T12:41:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duncan\_Tilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/duncan_tilka/32/62069_2.png) [@Duncan\_Tilka](https://community.glideapps.com/u/Duncan_Tilka)\
**Post date:** [November 27, 2024, 12:41pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/1 "2024-11-27T12:41:25Z")

</div>

Hi Glide Community,

I’m working on a Glide app where I’d like to streamline a process:

1. I have a single **Text Entry box** where users can input multiple lines of text (one item per line).
2. When a **button is pressed** , I’d like each line of text to create a **new row** in a specific table.
3. Each new row should not only contain the line from the Text Entry but also populate **other columns** with predefined data.

For example:  
If my Text Entry contains:

Item 1  
Item 2  
Item 3

On pressing the button, I want 3 rows to be created in a table on a specific sheet name:

 ![Screenshot 2024-11-27 at 7.40.31 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c30881798f886059c319f916dca25a38d3a07159.png)

### What I’ve Tried

- Adding a button with the **“Add Row”** action works for creating one row but doesn’t address splitting the input into multiple lines.
- Using **Computed Columns** (e.g., splitting the Text Entry into an array) doesn’t seem to integrate easily with the Add Row action.
- Manually creating multiple Text Entry boxes and assigning them individual actions would work but is impractical for 10–20+ lines.

### Challenges

I’d like this to be efficient, so users don’t have to manually press the button for each line. Ideally, the solution would:

- Split the Text Entry input into an array (one item per line).
- Use that array to dynamically create a row for each item in the table.

### Questions for the Community

1. Is there a **JavaScript column** or preferably another method using Glide Tables Computed columns that can split the text and handle the row creation in Glide?
2. Has anyone implemented a similar solution, and if so, how?
3. Are there any **external integrations** or creative workarounds you’d recommend to accomplish this?

Any advice or examples would be greatly appreciated!

Thanks in advance for your help.

— Duncan Tilka

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 27, 2024, 1:50pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/2 "2024-11-27T13:50:31Z")

</div>

Use a form container using a new table that you will use to temporarily store the data entered by the user. Add your text input.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/1/210bf6bd48e833d8c00795cedb97b1925f181092.png)

Here is the data table for final data.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/c/3c6d5494650a16333108bf0382f6af01cbbc2bd9.png)

Right click on the data table and show API. You will need to note the columns’ key, the table id and the app id. Also copy the api secret key:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/a/1ac0b190a7edb44d28264defb7026c8a4fae37ac.png)

In the temp table, add a JavaScript column:

```javascript
const lines = p1.split(/\r?\n/)
const appID = "ZdYhAx4mlLWUHZX7BpSO"; <--- change this to your app id
const mutations = lines.map(line => (
{
        "kind": "add-row-to-table",
        "tableName": "native-table-9jiFvByoqLAI4fpLffY9",<----- change this to your table id
        "columnValues": {
  change this to your column key ----> "57117": "Predefined data here",
       change this to your column key ----> "Name": line
        }
 }
));

const finalJSON = {
  appID: appID,
  mutations: mutations
};

const jsonString = JSON.stringify(finalJSON, null, 2);

return jsonString ;

```

Set p1 to the input column:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/6/46e1c00e122f9c208a3ce324dc45f63452192334.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/4/a4a7bcef6aeed4d884241c3b5b7dac16628a4cdc.png)

* * *

Add a workflow on the onSubmit event:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/7/87112edd1f399ace6680c599461209cc74f1beb0.png)

Add a Call API action:  
Set the endpoint to `https://api.glideapp.io/api/function/mutateTables`  
Set the method to POST  
Set two query strings:

1. Authorization: Bearer 
2. Content-Type: application/json  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/f/4fd71920b046d1b9e3e2012f5622ca18e1eec2cf.png)

For the predefined data, you can set that in the add row actions.  
 ![chrome_MlVwkyCPgd](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/843ab981f6707c60093f0b54f2c959b62f16687a.gif)

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [November 27, 2024, 2:20pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/3 "2024-11-27T14:20:03Z")

</div>

Sure!

There 2-3 ways (Maxime showed one) but I’d use the new Workflows feature:  
[https://community.glideapps.com/t/glide-workflows-schedule-trigger-beta/](https://community.glideapps.com/t/glide-workflows-schedule-trigger-beta/)

but we need to wait until the Webhook trigger is released (coming soon) to make this easier and in real-time. In any case using your example, you will consume 4 updates to carry it out

---

<div class="post-metadata">

**Author:** ![Duncan\_Tilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/duncan_tilka/32/62069_2.png) [@Duncan\_Tilka](https://community.glideapps.com/u/Duncan_Tilka)\
**Post date:** [November 27, 2024, 2:26pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/4 "2024-11-27T14:26:06Z")

</div>

Thank you both for the solutions! Wow I super appreciate your help.

---

<div class="post-metadata">

**Author:** ![Duncan\_Tilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/duncan_tilka/32/62069_2.png) [@Duncan\_Tilka](https://community.glideapps.com/u/Duncan_Tilka)\
**Post date:** [November 27, 2024, 2:26pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/5 "2024-11-27T14:26:28Z")

</div>

Thank you so much for taking time to explain and show this. Going to look it over in depth.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 27, 2024, 2:38pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/6 "2024-11-27T14:38:49Z")

</div>

It was my pleasure ! Anytime! 😃

---

<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:** [November 28, 2024, 9:52am UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/7 "2024-11-28T09:52:50Z")

</div>

> [@MaximeBaker](#):
>
> Set two query strings:
> 
> 1. Authorization: Bearer
> 2. Content-Type: application/json

Minor point. They should actually be set in the HTTP Header, rather than passed as query parameters.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 28, 2024, 12:56pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/8 "2024-11-28T12:56:57Z")

</div>

You are right!

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 28, 2024, 12:58pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/9 "2024-11-28T12:58:05Z")

</div>

Then, is there a way to store a private api key in a table and use it as a secret? As example, having multiple calls with the same api key, without having to duplicate it everywhere…

---

<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:** [November 28, 2024, 2:07pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/10 "2024-11-28T14:07:59Z")

</div>

You can, but it won’t be secure.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 28, 2024, 2:43pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/11 "2024-11-28T14:43:10Z")

</div>

At least if you are the only one to use the app.

---

<div class="post-metadata">

**Author:** ![plaiday](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/plaiday/32/83103_2.png) [@plaiday](https://community.glideapps.com/u/plaiday)\
**Post date:** [December 19, 2024, 11:08pm UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/12 "2024-12-19T23:08:43Z")

</div>

this is finally here, right?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 20, 2024, 12:35am UTC](https://community.glideapps.com/t/adding-multiple-rows-from-text-entry-lines-with-a-single-button-press-in-glide/78227/13 "2024-12-20T00:35:29Z")

</div>

Yes, it’s released.

> [@Glide Workflows Beta for Maker, Team (Legacy), Business plans](https://community.glideapps.com/t/glide-workflows-beta-for-maker-team-legacy-business-plans/78025/):
>
> Hello Gliders! The Actions editor is now the Workflows editor, and it’s more than just a name change. Starting today, you can create Scheduled Workflows to run at specific time intervals (hourly, daily, weekly). Scheduled Workflows let you automate complex logic in Glide using loops, nested conditions, and computed steps. They come in handy for things like: Sending bulk notifications Routinely processing and passing data between tables Automating task…
