How to Update a Row via Form Submission

Hello,

I would like existing users to fill out a form when they apply to be a contributor, but the details they provide in the form should also update columns within their User Profile.

I’ve tried using the Set Column Action, but it appears that the form entries just creates a brand new Row vs Updating an existing row. The only Row Options I have in the Set Column is “This Item” and “-”. The Sheet the Form is referencing is Users, which has Row Owners.

Any help would be much appreciated! The only workaround I found was to use a Google Form that Looks up and Updates and existing Row. I the form submission could go to a different GS and use a Zap to update the User sheet. Seems a little messy though.

Hola @Joe_Gabriele

You might have to create a single relation between the user profile and where ever you have the submission form. Then refer the set columns to that relation.

Then again it MUST be a SINGLE relation.

I hope that helps.

The tab my form is on is already set to my User Sheet. New Form entries go into my User Sheet vs updating the User whose filling out the sheet. Not sure how I relate the User completing the Form to their Row.

So the form is creating a row to your profile sheet and at the same time you want something added while the row is being created?

Is that your intended outcome?

My desired outcome is this:

  1. User signs in / creates an account with Email only.

  2. User then applies to be a Contributor on the site and fills out a form with:

  • First name
  • Website Name
  • URL
  • Social Profiles
  1. Upon submission of Form, Users profile will now also include their:
  • First name
  • Website Name
  • URL
  • Social Profiles

** Not all users will be Contributors, so I can’t send everyone through an onboarding process.

Basically, what I would want is the ability for an existing user to open up a form, fill out some text entries, which then feeds back into their User profile row, thus updating their info.

One workaround I have is that Contributors never sign in and just complete a Google Form with their email, which then creates a “User Profile”. Upon signing into Glide App with that same email, they now have all the data they submitted in the Google Form.

Another workaround is that they edit their user profile (with the desired text entries) and toggle a “Apply as Contributor”, which then prompts an action. But I dont like how applying is buried inside the edit profile screen.

A form will always add a new row every single time. It’s designed that way. Because of that, a form may not be the best choice here.

  • What I would do is maybe try a Link to Screen button with the ‘This Item’ option. This will give you a new screen connected to the same row (assuming the user is already viewing their detail). Then they can edit their details through entry components on that screen.
  • Another option is to just turn on editing for the user profile and only display the edit button if the signed in user matches the profile email. This is the original and simplest way to allow a user to edit a row.

I like the Link to Screen option because it gives you more options but requires a some extra columns to make it work nicely, but the Edit option is a lot easier to use. I would take a look at this example for some ideas.

4 Likes

Great, I will take a look! I didnt like the Edit Profile option because of the messy UX. Basically nobody would know how to apply unless I write "To apply as a contributor, you’ll need to edit your profile, update XYZ and then click the toggle button. I felt it was a little easier clicking a button and completing the new text entries.

Is there an action you can set to edit the user profile, or just the pencil?

1 Like

No, I don’t believe there is an action to get into edit mode, so only the pencil for that.

But with @Darren_Murphy’s example you should be able to Link to a Screen with entry components that fill user specific columns. Then you can have a button with an action to either Add Row for new contributors, or Set Columns for existing contributors to update existing rows.

3 Likes

Exactly.
And my example demonstrates both.
“Add Animal” - adding a new row with a custom form
“Edit Animal” - edit an existing row with a custom form

1 Like

I will def check this out. Thanks everyone!

1 Like

Interesting with the Unique Column for name too, this could work for when people add a Username and they must all be unique, right?

Yes, the same technique can be applied to any columns.

Cool, I think I got my custom form to work, but maybe a little differently than yours because of my setup.

My tab is set to Users Sheet. My “Apply” Button Action is set to Link to Screen. I then added my Text Entry Components and a Save Button, which has a Custom Action to Show Notification, Set Columns in this row based on the new Text Entries, Add Row to my “Contributor Application” Sheet (to notify me of new entries) and Go Back. I believe I didn’t have to create User Specific Columns because I already had Row Owners on, so they can only see/edit their own stuff.

I tested it out using several different user profiles and all showed only their data and updated their specific row upon submission. Pretty cool! Thank you!

I’ll have to look into the Unique Column for the Usernames though!

When you say “Unique Columns”, do you mean User Specific Columns?

In my demo, they serve two purposes:

  • As “temporary storage” for the user entered data - this is only written to the tables with the Add Row and/or Set Columns actions when the Submit button is tapped
  • For preventing duplicate entries. A relation is built between the user specific column and the target column. If this relation is not empty, that indicates that a duplicate would be created, and so the user isn’t allowed to submit.
1 Like

Yes sorry, I updated Unique Columns to User Specific Columns.

Yea I am digging deeper into your “preventing duplicate entries”. I’ll have to try after work :smiley: