I have CSVs for users and organizations and they need to link. I’ve uploaded the Users and now uploading the Organizations. I want to update the created by from app admin to the user email, but changing created by isn’t an option when doing an upload.
Is there another way to do this? Potential other solution is I upload the organization data then pull the unique id’s. Reupload the users with organization ID then figure out a way to do a search and update created by to the email that gets return when a search is done for users that have that organization unique id…
Hi @ejack728 You mean “created by” on the organization field, right? If yes, instead of using “created by”, why not create an editable field like “Owner” or “Author” or “Creator Editable” (type=user) and let it be filled with the unique id of the user. This will mean you will upload the users first before the organisations.
Does this solve your problem or will you still like to reference the organisation on the user data type after already referencing the user as an “Owner” on the organisation data type?
quick question.I then bump up against the same issue (a little different). I’d like to add my org id to my users which have already been uploaded. It doesnt look like I an overwrite. Is there a backend workflow where I can add org id to users once they’re in the database?
Create a backend api, say, “update_user_organisation”.
Let this backend api have a parameter user.
Then add an action to make changes to the user. (Your user data type should have organisation field.) update the user’s organisation field = do a search for organisation (constraint: owner = this user): first item
a. you can run a bulk action action directly from the “bulk” button on your user database and select the api you created in step 1, or
b. implement a click button that triggers schedule api on a list - the api would be the one created in step 1 and the users would be ‘do a search for users’ (that is all the users in your database).
@iwakinomotoye’s manual solution is great for one-time or infrequent maintenance. Alternatively, if you’ll be regularly importing new organizations and need an automated solution, create a workflow using a database trigger event that runs every time a new organization is created.