Get attribute from association in Regular expression for conditional visibility
Hello, I have Account and Challenge Entity with one to many relation between them and want to show Edit Challenge button only to the User who have created that challenge. For this I am using Conditional Visibility based on Regular Expression. In the Regular Expression I will compare the Email IDs of currentUser and Account object which is associated with Challenge as – $currentObject/MyFirstModule.Challenge_Account/Email = [%CurrentUser%].Email But I am not able to get attribute Email of account entity over association on Challenge object. What I am missing here? Is there any other way to achieve this?
$currentObject/Toetsen.Challenge_Account = [%CurrentUser%] is what you're looking for.
'[%CurrentUser%]' is a system variable, which holds the ID of the current user. You cannot refer to any attributes from there. I would create a second association for the editor-account and check that one with the XPath suggested by Paul Schreur