Randomly picking values from a dataset and then lookup other values based on this field

Hi,
I am trying to generate a set of users and assign them to randomly looked up organizations.
To do so I uploaded a dataset with a number of orgs identitfied by id’s.
The id’s are read by the dataset column type.
When previewing this. The values are read and assigned.

Then I’ll try to calculate department in a formula where I lookup the name of the organization by using a formula.
from_dataset(‘Orgs’, ‘org_name’, org_id: field(“user_org_id”))

when I now preview I get:
1,Melissa,Wood,mwood0@google.com,2,error: Could not access blank value: Use || to provide a default value for blank fields. Example: (my_field || 0) + 1

It looks like as if the field user_org_id (the randomly read org id from the data set) is not available at this moment.
The field department is of course AFTER the field user_org_id.
Any ideas?
Thanks

Could you post the share link to your schema? That would make it easier to diagnose what’s going wrong.

Sure

You actually don’t need a formula to pull the org_name based on org_id. Just use a dataset column and select the org_name field. It will automatically match up with the org_id field.

1 Like

Well, yes that worked.