Current user reference in template for visibility script

Hello Experts, 

Can anyone tell me if there is a way to reference the current user in a template? I need to add something in the visibility script to be true based on role.

Any help is appreciated. 

Thank you,

Lu 

Parents
  • I would go for the OnLoading-Script of the table where you want to alter the CanSee property for the column.

    In addition, I would check for the existence of a program function (QBMFeature) for the current user. This is way faster than checking a role membership.

    A sample code would look like this

    If Not Session.Principal.Features.IsAllowed("<QBMFeature>") Then
        Entity.Columns("<ColumnName>").CanSee = False
    End If
     

  • Thank you Markus i will give this a try. It would only be for users coming in from the Web portal. Do you have a suggestion on which program function to use for this? In the Web portal people are creating Reports and need to hide some columns for selection.

Reply Children
No Data