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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inputbox read-only property

Hi everybody,

does anyone know if exists the possibility of setting the read-only property for a Input box variable object via macro?

I'm creating automatically a set of variables and some of them must be read-only. The dialog property allow this but API documentation seems excluding this feature for Inputbox.

Both

boxprop.Layout.MemberAttributes.Item(0).ReadOnly = true

and

boxprop.Layout.ReadOnly = true

are stated as not correct

Thanks in advance

Luca

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

It is kind of hidden in the API Guide, but it is possible.

Here is the code to change a variable to Read-only:

set v = ActiveDocument.Variables("vVariable")
prop = v.GetProperties
prop.ConstraintsFlag = 4 'Read-only
v.SetProperties prop


View solution in original post

3 Replies
Not applicable
Author

It is kind of hidden in the API Guide, but it is possible.

Here is the code to change a variable to Read-only:

set v = ActiveDocument.Variables("vVariable")
prop = v.GetProperties
prop.ConstraintsFlag = 4 'Read-only
v.SetProperties prop


Not applicable
Author

Solved, thanks

Not applicable
Author

Hi NMiller,

it's just the solution I've found (in the same time of you).

Thanks a lot!

Luca