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
Set obj = ActiveDocument.GetSheetObject( "CH01" )
IF Obj.IsActive = True Then
ActiveDocument.Variables("vTest").SetContent 1, True
ActiveDocument.Variables("vTest").SetContent 0, True
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
Sales MI.qvw 488.5 K