Can't "make change to" a specific data type

Hi everyone,

I have a data type “user_profile” (in addition to the already existing data type “user”). On the click of a button, I want to make a change to a specific field of that data type. However, when I try to create a workflow for the button and “make change to thing” I cannot find “user_profile” in the list of available things to make changes to (see screenshot).

Only “current user” is available. I assume its because bubble doesn’t know which row of the table of “user_profile” it should make changes to (it tells me I am trying to change a list of things when I choose the “do a search for” option and choose data_type and the regarding field). So I guess I need to tell bubble which row of “user_profile” belongs to current user. How do I do this?

If that’s not it, then what else must be done so I can edit the correct field (that belongs to the current user) in “user_profile”?

Thanks in advance for your help!

You need to select a specific ‘user_profile’ to make the changes to.

Depending on your page data structure, you may be able reference such things as a parent group’s user_profile, the page’s user_profile, or the current user’s user_profile etc.

But otherwise you need to select one from the database - so you need to use ‘do a search for’ and then apply some constraints to find the specific one you want to change.

You also need to be aware that a database search always returns a list, even if there’s only 1 item in it, so you need to select :first item after the search in order to specify the individual user_profile you want to make the changes to.

Then you can select the fields you want to change and set their values.

Your user_profile data type is just that, a type or “template” describing the fields of your custom data type. You need to specify a specific “instance” of that type in order to make changes to it. Thus, you need to define a dynamic expression which points to a specific “Thing” (instance of a user_profile).

Thx for the reply,
yup, that’s what I basically mean by saying bubble doesn’t know which row I want to make a change to. But how do I go about it? How can I tell it which instance to make a change to?

Either Do a search for and specify the constraints, or if it’s somehow “related to” the Current User (or any other item in that list), just “drill down” via the contextual menus until you get to it.

For instance, if you’ve defined the User type to have a field of your custom type, then the expression would be Current User's user_profile.

1 Like