I have added custom button using command bar , I need to control the visibility of the button based on the logged in user .
Logic - Button should be visible only if assigned to user is equal to the current user.
I have added below power FX code , but the code doesn't seem to work , can you please guide me where I am doing wrong.
If(Self.Selected.Item.'Assigned to'.'Primary Email'=User().Email,true,false)