Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set the "Always one selected" property through macro

Hi Everyone,

I'm having trouble to set the property "Always one selected" for a listbox using macro. This feature working fine in developer but not in server.

Requirement is, when a user logs in we have to select a value (in specific field) and enable "Always one selected" property.

 

sub SetOneAndOnlyOne
set obj = ActiveDocument.GetSheetObject("LB01")
set boxfield=obj.GetField
set fprop = boxfield.GetProperties
if boxfield.GetFieldFlags.OneAndOnlyOne then
fprop.OneAndOnlyOne = false
else
fprop.OneAndOnlyOne = true
end if
boxfield.SetProperties fprop
end sub

The above code is working fine in QV developer. But when i deploy it on the server and opened the application through IE client,

the macro not able to set the property or reset the property onlyoneselected.

Can someone shed some light on this why this not working in client? I badly need this to be working...

Thanks in advance.

Regards,

Venkata

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

To execute macro in server you need to enable the option "Allow Macro Execution on Server" in

System -> Setup -> Miscellaneous section. (In QV 11 Server(QMC))

Hope this helps you.

Regards,

Jagan.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

What version of QV Server?

Not applicable
Author

"Allow Macro Execution on Server" option is already enabled on server. We are on QlikView 10 SR3.

When i create a listbox on client (IE plugin), select a value and goto properties, i observed the property "Always one selected value still grayed out".

Please suggest.

Thank you,

Venkata

Not applicable
Author

This problem "OneAndOnlyOne is working fine in developer but is failed in IE Plugin", have you resolved it?

galrion82
Contributor III
Contributor III

Not all macros that work locally work when accessed from QlikviewServer.

82.2 Macro functionality limitations

Functionality that will normally work well in macros in the QlikView Server environment with any type of client is:

  • Logical operations such as clearing or selecting in fields
  • Operations related to variables

The following types of functionality are not to be used in the QlikView Server environment , as they may cause unexpected results:

  • Layout operations acting on the properties of sheets and sheet objects via SetProperties
  • Operations changing document or user settings
  • All operations related to the script, including Reload
  • Data reduction operations, e.g. ReduceData
  • Operations such as Save and Open document

OneAndOnlyOne changes a document setting so you can't use it from the Qlikview Server.

You need to find different way to achieve this.