Combine Entity & CurrentUser in XPath

1
An XPath constraint has to start in the entity you are in. For instance, [MyModule.MyEntity_Account='[%CurrentUser%]'] Now, for a situation I need a constraint that has the following structure [MyModule.MyEntity_Account='[%CurrentUser%]' and '[%CurrentUser%]']/CurrentUser_Company/MyModule.Company/BusinessType='NV'] ] Unfortunately, it is not possible to use '[%CurrentUser%]' as starting point in the XPath constraint. The XPath constraint is preferred above a data-source solution due to security. I am thinking about adding extra userroles. On login, userroles are added/removed. Are there more alternatives to use a combination of the current object and current user in the XPath constraint?
asked
2 answers
5

I think you can combine these 2 into 1 constraint to something like this.

[MyModule.MyEntity_Accoun/Administration.Account[id='[%CurrentUser%]']/CurrentUser_Company/MyModule.Company/BusinessType='NV']
answered
0

If you're really looking for more granularity in configuring a set of objects you might want to consider a microflow data source. That will extend your options exponentially, including the scenario you're describing above.

answered