10 Replies Latest reply: Jun 30, 2011 6:23 AM by Deepak Vadithala RSS

    Is this possible

      I have the following syntax in a variable which shows a button depending on what the variable returns. The button is placed within a graph so when the user drills down to status level the button will appear: -

       

      if(getselectedcount(Status)=1,1,0)

       

      As there are more than one graph on the page with the status option I want the button to only appear within the grpah that the selection comes from.

       

      Does that make sense?

       

      Example - CH01 has the button but the user selects a status from CH02....I don't want that button to appear unless the selection comes from CH01

       

      Can anyone help??

        • Is this possible
          Deepak Vadithala

          Yes it is possible. Please can you load the sample QV document? I can work an example with your sample data?

           

          Cheers - DV

            • Re: Is this possible

              I've attached the QVW as requested!

                • Re: Is this possible
                  Deepak Vadithala

                  Hi Sam,

                   

                  Let me make sure if I had understood the requirement. You wanted to show the "Show Detail" button only when you select "Declined" from Tender Status chart. I mean if you select "Declined" from other sources you don't want to show the button. I am assuming this is what you need.

                   

                  If this is what you need. Then I got it working in the attached example. Here are the steps...

                   

                  1. Created one more variable called vTest

                  2. Created a VB Script procedure

                   

                  Sub ShowButton()

                      Set obj = ActiveDocument.GetSheetObject( "CH01" )

                          IF Obj.IsActive  = True  Then                                                                   

                              ActiveDocument.Variables("vTest").SetContent 1, True       

                          Else

                              ActiveDocument.Variables("vTest").SetContent 0, True       

                          End IF

                  End Sub

                   

                  3. Created a trigger on the Status Field for OnSelect event

                  4. Amended the Button condition to =$(vShowDetail)=1 and vTest = 1 (Both conditions should be passed to show the button)

                   

                  My VB Script procedure works on IsActive property of CurrentSelection Class. I mean when I select the chart ("CH01") in our example then it sets the value of vTest variable to 1 else 0.

                   

                  I hope this makes sense and let me know you need further help!

                   

                  Cheers - DV