Show tags based on current user

We have a client that rents out Units. Data is sent from those Units to a database. We created views to give our client an insight in the data. An overview is shown in a simple form (table) and a detailed form (flex repeater). From this Unit overview screen the user can go into a Unit details screen. There are different types of Units, but all units are UDT Instances containing between 10 and 25 tags.

Our client wants to share these insights with their renters.

Is it possible to keep the same views, but limit which tags / units are shown based on something related to which user is logged in?

My first thought was to add an extra parameter to the UDT Definition, in which the renter is specified. Then when filling the table or flex repeater, add a (line in the) script to compare logged in user to the Unit's configured renter, and add it to the view or not.

Does this seem feasible? Is this the right way to approach it? I would appreciate some insights.

Also, I made this visual, to bring across that our client sees every unit, but each renter would only see the ones applicable to them (each renter their own color). In hindsight I don't think it adds much, but I made it with passion.

That's one way. Another would be to create a role for each unit, and assign it to the UDTs custom security. But that could definitely get ugly if you have a lot of units. But if you have a lot of units, but not a lot of renters (looks like you have 5?) then maybe the role is by renter and it's applied to all their units.

Thanks for your insight @tgarrison . There are close to 400 units, and I really have no clue on how many renters there are. I don't have those insights.

I don't see myself making 400 roles, but I do see how it could be effective in other situations.

Yeah, I wouldn't want to make 400 roles either. But maybe if the renter number isn't that bad, that may still be an option.

Of course, 9 roles used in combination (binary) gives 512 uniques..

You may want to consider two tables. One with current renter user id's and one to correlate a unit with a renter id. A single query would tell you which units should be visible/active.

This is how I'd manage it. Then a template repeater (if Vision) or a flex repeater (if Perspective).