Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like to force a field property to be locked regardless the Unlock or Unlock All actions are used.
I was trying to find on some of the standard document properties or actions something that could have that effect but didn't succeed.
I did go through the API Guide, and there are some macro examples - onUnlockActionitems, CanUnlock that with the proper changes might provide the desired result - to remember: a field is locked by action when document opens and I want it to keep that locked status during all user session regardless someone press Lock/Unlock buttons.
If this can't be achieved is it feasible to just de-activate the Lock / Unlock functions for the entire document?
Thank you very much for your help
Regards
Joao
The macro is pretty straightforward.
Sub Lock
ActiveDocument.Fields("FIELDNAME").Lock
End Sub
As footsie said, put this in the UnLock event of your field.
Hi Indiana,
The only method I can think of is field specific and requires a macro. You might want to keep more than one field locked. Basically what you can do is create a macro to lock the field(s) in question. On the unlock event for the field call your macro to lock it. You could possibly use an action if you are using Qlikview 9. I am using 8.5 on site today so cannot test on 9 until later today.
Kind Regards
Footsie
Hi Footsie,
Thanks for your reply.
Understood your suggestion which goes in direction I've searched.
Is it possible for you to design the macro as I'm not familar with vbscript?
Appreciate all your help
Regards
Joao
The macro is pretty straightforward.
Sub Lock
ActiveDocument.Fields("FIELDNAME").Lock
End Sub
As footsie said, put this in the UnLock event of your field.
Hi NMiller, Footsie
It's solved thanks to you both.
In fact there's no need for the macro. Just define the OnUnlock event over the field of interest and then set the action for a Lock.
Again thank very much
Regards
Joao