Setting column values from newly created row in another sheet


Meshi · Update Name Template of Families to User Family - Watch Video

//NO AUDIO//

Hey there,
I have a use case where I want to onboard a user:

  1. They sign up
  2. They enter their first and last name
  3. They create their family unit (which I can then use as a “role”/“row owner”, so they can invite their family in)
  4. Upon creating their family unit, a new row in family is created where the last name of the user is used, along with a formula to create a “Name Template”.
  5. I then want to take that name template and push it back to the User Table into the Family field.

I feel like I’m so close but can’t quite get it. At the moment, it’s doing step 1-4 but step 5 it’s taking the name template of a different family, not of the one that was just created.

Regarding the below:

Is that Family column configured as the Role column in your User Profile configuration?
If yes, then that will be why you can’t set it with an action.
Roles can only be set via the Data Editor, or via the API.
So to do what you are trying to do, you would need to use the Glide API.

1 Like

Ohhh! Thanks Darren. I’m yet to play around with the API. Guess that’s the next step for me.

Let us know if you have any problems with using the API.

Here’s a documentation link.

Thanks @ThinhDinh

I’m wondering if there is a better way of doing this. If the initial user signs up is there a way to assign a unique value to the Family field (acting as a role) by default, then when they add family members for that value to be assigned to those users?

If you have an onboarding flow, you can add a unique ID for the “family creator” when they finish their onboarding. For every person that is added by that user later on to the family, you can use a user profile value in the form to add that unique ID to the new rows.

But talking about that, you seem to already have a flow to generate the “Family” text? Maybe you can just use that? Or do you still want to keep that column in your role setup?

Is a way to make sure it’s unique is to just pull across the row id for that user?

That’s also a way to do it. The unique ID flow above also creates a unique string for you.

It is possible to assign a Role when a user is created, but only if the User adding the new row already has the role being assigned. For example, if you have the role “FamilyX”, then you can add new users and assign that same role. But it can only be done when the new row is created, and it cannot be changed (via the UI or an action) afterwards. So it would need to be done as part of an Add Row action, or passed as a user profile value with a form submission. It could not be done as a Set Column values action (as you were trying to do in your video).

1 Like

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