Permission to view certain data base records


I’m trying to build an app that allows users to view only the records they have permission to see. Permission comes from adding the account number they need to see to a list of account numbers in their profile (the user datatype has a “permission” field to hold a list of text which they can add the account number too).

I have a datatype (named: account details) which is customer account records that holds account number (which is actually a text field), name, address etc. the account number being the what the user needs in their permission list to be able to view it.
I have a repeating group that hold all the entries in the account details datatype, but need to restrict this by the users permissions so they only see the ones they have permission to see.
In the privacy section I have a role under Account Details that says: When current users permission contains this Account details Account number.

But I cant get it to work! What am I missing? Are there any tutorials you would recommend that covers this sort of function? I’ve watched countless hours of bubble tutorials but this completely evades me. Any tips would be greatly appreciated as I’m clearly missing something.
Otherwise I’m loving it, the rest of the app works great I just cant get this to work which is clearly my misunderstanding of privacy roles (or something…)!

Many thanks in advance!

Hi there, @andrewbillcliffe … if I understand your post correctly, I think you might just need to uncheck all of the boxes associated with Everyone else (default permissions) on your privacy role. If those boxes are currently checked, that is likely the issue.

Also, just curious… any particular reason you are creating a list of account numbers instead of having the list link to the accounts themselves (i.e., having your permissions field be a list of account details)? I would go the latter route , and then your repeating group’s data source could simply be Current User's permission.

Hope this helps.


Hi Mike, many thanks for this! It was indeed the fact I hadn’t changed permissions for everyone else… Rookie mistake. Thank you!

Although i’m not sure what you mean by just linking the accounts themselves. surely you need to have something associate between the two, in my case its the account number.

My pleasure, @andrewbillcliffe … happy to hear it’s working now!

What I meant with the rest of my response is that when you create a field, you can set the field’s type to be another custom data type. So, instead of having your permission field hold a list of texts that are the account numbers, the field could hold a list of account details (i.e., your data type for customer account records). and then there would be a “direct” link to the customer account record itself as opposed to an “indirect” link to the record via the record’s account number. Anyway, just food for thought, and if what you have is working for you, there’s probably no need to change it.


I see what you mean Mike, had a play around with that and to be honest it does suit the project, thanks for the tip!

1 Like