Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Locking of field

Hello all,

I am using QV 11. I want to know is it possible to lock a field based on some condition?

Like say for example, if OSUser = 'ABC' then only lock field F1.

Is it possible?? Please jump up with ideas ASAP.

1 Reply
Not applicable
Author

Hello All,

I created following macro to lock the field and called it depending on the user

on 'On Open' trigger.

Sub SelectAndLock

set var = ActiveDocument.Variables("vB")

  ActiveDocument.Fields("Branch").UnLock

   if var.GetContent.String <> "Branch A" then

  ActiveDocument.Fields("Branch").Lock

end if