Append a value to a column

Is it possible to append a value to a column rather than clear the existing value and then replace it with a new value?
I am creating a jobs app where employers post jobs and jobseekers apply for a job.
I have a Jobs sheet which contains a list of jobs. When a job seeker views a job, the job seeker can apply for the job by clicking a button. I have a column Applications in the Jobs sheet which I would like to use to collect all emails of users who have applied for a job.

Is there a way to add an email to the column which would have other emails as well? If I use Set columns, it only adds each users email after replacing the existing value. Any option to keep adding emails to the column?

Yes, this is possible. You can create a joined list of emails in a single column. One approach is:

  • Start with the column that will hold all the emails. Let’s call it “Emails”
  • Create two template columns
    • The first will contain a replacement for the current email to be added to the list
    • The second will contain two replacements: The current value of “Emails”, plus the next email to be added, separated by a comma
  • Finally create an if-then-else column to determine which template to use to write the new value of “Emails”. Use the first one if “Emails” is empty, otherwise use the second one.

Edit: if you also need to be able to remove emails from the list, check out this tutorial

1 Like

Let me paraphrase in order to be able to understand.
I create a column Emails which is a basic column of Email type.
I create another column New Email to which when a job seeker clicks the Apply button, it will set the column New Email with the job seeker’s email address.
Then, I create a template column First Template which is A, where A is New Email.
Then, I create another template column Second Template which is “B, C” , where B is “Emails” and C is “New Email”.

Now, my question how would Emails column get updated? It is basic column, and if nothing is written to it, it will remain empty. Which column do I use the “If then else” column mentioned in the last point?

No, it should be a text column.

I would use a User Specific Column for this.

Yes, that’s correct.

When the user submits, you write the value of the if-then-else column into your emails column.

If you want something to study, make a copy of the below app, and look at the Announcements table and screen.

Awesome! Thanks. Its working and the logic is beautiful. Love it! :heart_eyes:

1 Like

While setting the columns, I not only set the New Email column with the user’s email but also did the pasting of the If-then-Else template column to the Emails column. A screenshot pasted below:

How can I get the number of values inside a cell? For example, I have three values separated by comma in the Applicant Emails column. How can I get its count which is 3? I find that if I use rollup, I can only get the count of number of values within a column, and not within a cell.

I can’t think of an easy way to that inside Glide. Probably in the flow above you add increment action to a number column?

Ok. Great idea, Thanks

1 Like

Wanted to add to this thread as it was helpful in creating an append column in a slightly different way.

Problem: I wanted to create a form where a response would append to a particular column rather than create a new row or be added to a seperate column. All within Glide because I like Glide :slight_smile: .

Solution:

To append these values I first set the following User Specific Columns

  1. A column to store text to be added when a response is submitted. (Text Add)
  2. A column to store text that would store all of the text from collected responses. (All Text)
  3. A column to store the text that the Text Add values would be appended to. (Append Text)

Then used a custom action to:

  1. Set Append Text with the value in All Text
  2. Then clear the value in Text Add so that it would be available for next use

To append text the “Append Array” function column was used. To facilitate the adds an array column was created with the value of Text Add using a lookup column. Then an array was created to house the value Append Text. Then the Append Array function column was used to append the value of Text Add to Append Text.

Afterwards made a few changes for formatting and boom! A form submission that appends values to a User Specific column, which can then be saved to data a la custom form functionality. How do I create a custom form?

2 Likes