Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i am launching a URL from the straight table box now when i click the hyperlink i want the variable value to be changed i have to do some actions
on the click of the hyperlink for this .so how can i track the click in my hyperlink
Hi,
Do you have many Fields in the table? If it is only one Field in the table then you can use this IsActivate property.
Sub CountTableSelections()
Set obj = ActiveDocument.GetSheetObject( "CH01" )
IF Obj.IsActive = True Then
ActiveDocument.Variables("vTest").SetContent 1 + ActiveDocument.Variables("vTest").GetContent.String,True
Else
End IF
End Sub
Good luck!
Cheers - DV
Hi
i can click the table first and then click on the link so in this case even if i simply click the table the variable will be
set i dont want that to happen what i want is only when i click the hyperlink in the expression the variable should be
set .Also where should i call this macro
I totally agree with you. This is not the best solution and we need the property of Display Options > URL to capture the clicks. I am looking at the API guide and I'll get back to you if I find something better than this one. You use the Field Event Triggers and you can use "OnSelect" event with relevant field selected.
Cheers - DV
Guys any update
Just a thought, but if you have built the hyperlink based on the data in your view, i.e.
=[Name]&'<url>'&'http://www.google.com/search?q='&Name
Couldn't you parse the GetCurrentSelections() function to build the variable? Or GetFieldSelections()?
hi leonard,
what i am doing is i am passing the value to the URL which is taken as a dimension i.e
https://10.0.2.3/empid=[EMP ID] where the EMPID is the dimension in my chart. also when i click the link the
dimension [EMP ID] will not be selected so Getfieldselection() cant be used
Have you tried any field event triggers? Ctrl+Alt+D then go to the triggers tab. Seems you should be able to set the variable and launch the URL based on what you click in the [EMP ID] field? Or at least fire off a macro to do the same?
(Sorry this is way above where I have gone before so not a lot of help...)
yes you are right i can trigger something when some field is selected but in this case the field will not be selected
just the link will be clicked so i have track the click on the link and then set a variable on that event
Hope this explains correctly what i need
Could you add a second trigger to launch the URL when the field is
selected and not make the field itself a hyperlink?