Assigning specific data to a user

Not sure I understand your use case exactly, but it sounds like you want your users to only have access to their specific data.

You can use lookup keys for this. Lookup keys can be assigned to users or roles, and if a user has a lookup by the same name as a role lookup, the user lookup takes precedence.

Set up your lookup by giving it a name, for example: my_company_id, and a value – the value of the company_id that corresponds to this user or role.

Then in the role access settings, add an advanced filter to _table/companies, where company_id = {my_company_id} (see screenshot)