Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone know of an example where a button is used to Lock/unlock a selection in a particular list box? I imagine that I'll have to actually have two buttons (one to lock and one to unlock) and a "hide/show" variable depending on the condition.
But the condition I need to check against is:
if (Listbox A is locked show unlock button, else show lock button)
Go to Properties > Actions > Add > Unlock Field > Add Field
Click on Add Again > External > Set Variable > Add variable vLock and set it to 0
Add another button but select Unlock Field.
Click on Add Again > External > Set Variable > Add variable vLock and set it to 1
Then on show hide add something like if(vLock = 1) on the one button and the other button if(vLock = 0).
Place these 2 buttons at the exact same location in your model before you set the conditional hide / show. This way you will never know its actually 2 different buttons.
This should do what you want it to do.
Regards,
Marius
You should be able to use a single button and change the text based on the value of the variable something like:
=if(vLock = 1,'Unlock','Lock')
The action would be:
=if(vLock = 1,0,1)
Go to Properties > Actions > Add > Unlock Field > Add Field
Click on Add Again > External > Set Variable > Add variable vLock and set it to 0
Add another button but select Unlock Field.
Click on Add Again > External > Set Variable > Add variable vLock and set it to 1
Then on show hide add something like if(vLock = 1) on the one button and the other button if(vLock = 0).
Place these 2 buttons at the exact same location in your model before you set the conditional hide / show. This way you will never know its actually 2 different buttons.
This should do what you want it to do.
Regards,
Marius