function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anish Mahadik 1Anish Mahadik 1 

How to use hyperlink onclick counter in reporting of Lightening version

I have requirement to show the counter variable in Salesforce reporting.
This counter variable is nothing but no. of times the user clicks on the hyperlink. So for these i have already created the counter with below logic and i just want to know how can i used this variable in my reporting for Lightning version.

<aura:attribute name="counter1" default="0" type="integer"/>          <lightning:button variant="Test1" label="Click" onclick="{!c.handleClick }" />  Counter value is : {!v.counter1}  

({     handleClick : function(component, event, helper) {         component.set('v.counter1',component.get('v.counter1')+1);              } })

Please let me know how i can used this variable for reporting in Lightning.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Anish,

Although there could be multiple ways one way I could think of is to have a field as such to show the count value.

In case if this helps can you please choose as the best answer so that it can be used by others in the future.

Regards,
Anutej
Anish Mahadik 1Anish Mahadik 1
Hi Anutej

Thanks for the reply . I am new to the lighetning version so could you please elaborate in more details.If possible can you please add some sample code.

Thanks,
Anish
ANUTEJANUTEJ (Salesforce Developers) 
So I searched for implementation of how could this be done according to my way however, I found this dev forum thread where in it shows on a way to the similar use case in visualforce pages can you please have a look at it once.

>> https://developer.salesforce.com/forums/?id=906F00000008yYqIAI