Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro - Turn on and off always single selected value - Not working in AccessPoint

Hi,

We are trying to use the macro below to turn off the 'Always one selected value' property for a single field when navigating to a sheet and then turn back on when leaving the sheet.

The Macro works great in the desktop but fails to run when in AccessPoint (AJAX and/or IE-Plug In)?

Is this type of macro not supported on the server? Or are we using an old VBA script that can be updated to run?

We have checked all settings in the Document macro module for system access and QV server side to allow macro execution and unsafe macro execution, etc. Are there any windows server side settings that also can be changed?

QV 11.2 SR12 Desktop Client

QVS 11.20.12904.0

Windows Server 2008 R2 Enterprise

Any help on this or even a better way to achieve this would be great 🙂

Thanks,

Joe

-----------------------------------------------

-----------------------------------------------


Sub AlwaysOneSelected

    set obj = ActiveDocument.GetSheetObject("LB146")

    set boxfield=obj.GetField

    set fprop = boxfield.GetProperties

                fprop.OneAndOnlyOne = True

            boxfield.SetProperties fprop

End Sub

Sub RemoveAlwaysOneSelected

    set obj = ActiveDocument.GetSheetObject("LB146")

    set boxfield=obj.GetField

    set fprop = boxfield.GetProperties

            fprop.OneAndOnlyOne = False

            boxfield.SetProperties fprop

            ActiveDocument.ClearAll True

End Sub

6 Replies
Not applicable
Author

Upon further investigation the .OneAndOnlyOne property cannot be invoked in the sever as this results in a document property change.

Thanks,

Joe

mayankraoka
Specialist
Specialist

Macro wont work for AJAX client.

Regards,

Mayank

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Strange, we have macros in almost all our applications and they work. Ajax as only client.

marcus_sommer

As alternatively you could duplicate this field within the script like: field as field2 and then apply your different settings (even set .OneAndOnlyOne on a listbox-object - it's a field-property).

- Marcus

IAMDV
Luminary Alumni
Luminary Alumni

This is not right.

Rather - Not all macros work on AJAX client.

Colin-Albert

General advice on macros

Macros are Bad