Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

Always one selected macro working in Local Development but not in Server

Hi All,

I have a report in which I can not set Always's one selected as by default but on click of some button & need to reset it back to normal when returning back.

Now I have a macro which does this for me but the macro is working on local machine but not on the server

Sub SetAlwaysOneDate

          set dt=ActiveDocument.GetField("DATE_1_or_2")

          wSel=dt.GetSelectedValues.Count

          if wSel=1 then

                    set prop = dt.GetProperties

                    prop.OneAndOnlyOne = true

                    dt.SetProperties prop

          else

                    dt.Select "DATE_1"

                    set prop = dt.GetProperties

                    prop.OneAndOnlyOne = true

                    dt.SetProperties prop

          end if

End Sub

Sub ClearAlwaysOneDate

    set dt=ActiveDocument.GetField("DATE_1_or_2")

    set fprop = dt.GetProperties

    fprop.OneAndOnlyOne = False

    dt.SetProperties fprop

    ActiveDocument.ClearAll True

End Sub

I am not sure as it is working on my local machine but not on the server. Please let me know if someone know anything about this.

Thanks in advance.

Amar

1 Reply
Not applicable