Unable to Associate New Thing with A User's Thing

Can someone help me accomplish the following:

For Users I created a field “Vendor” with a type of Vendor.

When the user fills out a form I want to create the Vendor and then associate it with the User with the Vendor field.

I tried creating the new thing followed by a step where I modify the CurrentUser’s Vendor based on the previous step. It isn’t working and I’m sure I’m missing something.

Any help would be appreciated.

Make sure the database is set up correctly and you have two datatypes:

  1. User
  2. Vendor

Make sure each as a datafield to relate to the other

so User data type has “vendor” as a datafield and Vendor data type has “user” as a datafield

When the user is filling in the form to create their vendor profile, at some point you need to create the vendor…I’d say if using auto bind on the form you need to do that when the page loads the form, but if you want to wait until they have entered everything and have a save button create the vendor then.

If doing it on a save button, first action is to create the vendor, the next is to make change to user with the vendor being “result of step 1”

If creating vendor on page load then you should be setting the data type somewhere, either on page, group or custom state. Either way you do it, you could just set the user’s vendor datafield at that same time or later, but make sure you reference the correct place you saved the vendor data type.

2 Likes