How do I set the secondaryValue of a Statistic component

I cannot set the secondary Value of an Statistic via "Control component" so instead I thought I could edit it via "Run script" and by writing this: "statistic1.secondaryValue = 0;" - Unfortunately it won't change anything and there is no Method like "statistic1.setValue()" for the secondary Value...

How can I set the secondary Value?

Thank you!!

1 Like

@Kimon You have to set that within the component itself using a basic formula

Screen Shot 2022-05-31 at 11.43.03 AM

Also, see: Statistic | Retool Component Library

Oh. And how do I refresh the component?

@Kimon - I think it depends on how often you want to refresh it....
Is this a value that needs real time updates, when the app page loads, or can the user click a button/link to see up to date data? Whatever query populates this information, would be the query that would need to be rerun.

I run multiple Querys on Page Load