but when i then have this privacy rule instead the personal data for other users is hidden but im not able to see the list of employee the is added to the user and just get empty lines for them
If you want the User to only be able to see the Data (of that type) that they have created (as your privacy rule name implies) then the rule should be:
In this case its not a thing with a creator.. when a user sign up they have the option inside there backoffice to sign up user on behalf of other there then will be employees of the main user.. so they are listed on a field as current users employees..
But my issue is that i cant figure out how to define a privacy ruke there both protects the users data from other user in the db but also allow them to see the employees data
Once you have set a privacy rule, the data becomes hidden by default unless it matches a conditon you have set, then it can be seen
You can simply use this condition, “when user’s invitee(employees) contains current user”, then you tick whatever option you want to be visible
Another thing is how you are structuring your database, based on your explanation. I think the user datatype will have a datafield of a list of users(employees)