Forum Academy Marketplace Showcase Pricing Features

Where should I be reading to understand how to assign data to Users?

I know, it sounds ridiculously easy, just to assign data to Users, but I can’t fathom it out.

Think AirBnB:
So, there’s a data type User and a data type Room (fields: roomname, image, description)

And in the Design there’s a Form to complete to add data. The form has three inputs too: roomname, image, description

Then in the workflow, when I hit submit

  1. Create new Room >roomname = this input’s value, etc.

But then I’m stuck. I think I need to Make changes to User, but nothing seems to work.

I’ve been struggling with this for far too long, and can’t find any documentation to help.

Every thing already has the User assigned to it in the Creator field.

So when you create something like this …

And the User is logged in, the creator is added automatically.

You can see it by using the little pencil icon in the data view, and ticking “created by”.

So then you can do a search for Locations where Created By = Current User.

That is the easy way. It works, and you get it “for free”.

If you wanted a list of Locations on the User, then you want “Make Changes to User”.

It is often handy to just have this list available for queries, but you don’t NEED it. It just means you don’t have to do a search to get the list of a user’s locations.

@NigelG that’s actually super helpful.

But what if a User had several Locations. How would you define WHICH location_text to change?

For editing a location ?

You would need to let the user choose a location. So either a repeating group with an “edit” button. Or a drop down with a list of locations.

Then your “Make Changes to thing” …

Would point at the thing the user has chosen. So either “this cell’s thing” if it is a repeating group. Or Dropdown’s thing.

Having pointed at the thing that needs changing … you then set location-text on that thing.

1 Like

Oh my actual gosh. That actually worked. It actually saved the data to the SAME row as what I was changing.

I hope you are keeping a tally, it’s two beers now. :beer: :beer:

1 Like

Hurrah :slightly_smiling:

1 Like

SO that’s all great, but the dropdown which chooses the “Location” to edit keeps resetting after I do a change the first field, and before I can change the second field… how can I fix it permanently? Move it to a different group? Send it to a text box? There are going to be lots of fields to change, and I’m thinking it’s best to do it in small groups, but on the same User Location number.

Are you doing a “reset fields” ?

We did look at a way to default the last selection, which is what I think you want ?

Thanks for this. It doesn’t seem to be working for me. I have a Data Type (Locations) which has two elements, a name and target score

What am I missing?

Hey @aliandrihab is your “userLocation” field within the User type: “Locations” or a different type? If you change that field type to Locations it should add the Location created in Step 1 to that User field. :slight_smile:

You’re the best! Made my night! Thank you :scream:

1 Like

Aww! Awesome! :smiley: Also, it’s no biggie and doesn’t affect anything, but I think it may be easier for you to rename Locations to Location. Once you navigate to the App Data of your app (where all of those ‘Things’ data are), it will make the ‘Thing’ plural to Locations automatically.

So in the Data Types Tab it is (a Type of Thing/a Type of Data):

And in App Data it is (Things/App Data):

That’s so great. Thanks for the advice

No problem! :slight_smile: