You shouldn't use the System.User unless you are storing the "Created By" and constraining by ownership. I believe you want to constrain using the Account entity, therefore you need to make an association....
You could create an association (1 to 1) from MultiTenantAdministration.Tenant to Administration.Account (Or consider a * to 1 if you have multiple users for each Tenant that can see the shared Tenant data...)
You would edit the user profile page to have a drop down selector for Tenant that they belong to.
Then update your Xpath constraing on the Tenant entity by using the "Path to user" button. Drill down the association until you hit the account.
Does a TenantUser inherit from System.User? If so, why can you just use the association without the /name part of it? If not, why doesn't the TenantUser inherit? You probably also want [%CurrentUser%].
I've tried a variety of approaches and am blocked on an inability to filter a list by an attribute being equal to CurrentUser.Name
Confident this is a use-case others have experienced and solved.
To boil this down:
if you have an entity, call it Foo, it has an attribute 'Bar'
you need to point a DataGrid or DataView to Foo with the constraint that Foo/Bar = CurrentUser/Name
My actual situation is more complex than this but let's start here... If this cannot be accomplished with DataSource XPath then perhaps with a Microflow? Thanks
How does this not work..?
[MyFirstModule.Item_Tenant/MultiTenantAdministration.Tenant/MultiTenantAdministration.TenantUser_Tenant = '[%CurrentUser%]']
It gives you all the items belonging to the TenantUsers organization (tenant..)
Basically, the token '[%CurrentUser%]' is replaced by an ID when executing the comparison. TenantUser_Tenant also resolves to an ID, the be more precise it resolves to the ID of the TenantUser-end of the association between Tenant and TenantUser. TenantUser inherits from System.User, so those two will be the same..