KB-31073: Restricting the access of logged users according to the computer being used.

Question:

How can I restrict an authorized user from viewing and editing data according to the computer they are using?

Solution:

To do so, you can create a script in the Viewer‘s OnStartRunning or OnLogin event. For example:

Sub Viewer_OnLogin()
   PCName = GetComputerName()
   If PCName = "Processo1" Then
      Item("NumMaq").Value = 1
   ElseIf PCName = "Processo2" Then
      Item("NumMaq").Value = 2
   End IF
End Sub

In this example, NumMaq is a Viewer’s internal tag.

After that, link the screen objects’ Enabled property to NumMaq tag’s Value property according to the computer accessing the application. You can group objects as needed and create a table connection for them according to the value passed to NumMaq tag.

Attachments:

Example KB-31073.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *