Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement where I need to force an always one selected value but I need to clear it as soon as I leave the sheet. I found a macro on Qlikview community which is doing my job. The macro is below
sub alwaysoneselect
set qvobj = ActiveDocument.GetSheetObject("LB427")
set myfield = qvobj.GetField
set fieldprop = myfield.GetProperties
fieldprop.OneAndOnlyOne = true
myfield.setproperties fieldprop
end sub
sub removeoneselected
set qvobj = activedocument.getsheetobject("LB427")
set myfield = qvobj.getfield
set fieldprop = myfield.getproperties
fieldprop.OneAndOnlyOne = false
myfield.setproperties fieldprop
ActiveDocument.ClearAll true
end sub
I call the alwaysoneselect macro on activation the sheet and call removeoneselected on leave the sheet.
The macro is working wonderful on using qlikview desktop. However the same macro is not working when I use it qlikview server and access it on access point through my browser
I have allowed system acces on qlikview desktop and allows unsafe macro execution on server
Can someone please help me how to fix this
Syed
Sheet triggers only works when you use plugin as client.
Using Ajax client it will not work, have a look at triggers in the reference manual.
Possibly it works with a variable / several variables as trigger (OnChange):
varSheet = if(GetActiveSheetId() = 'SH01', 'select', 'deselect')
- Marcus