Passing multiple Calculated values to document property
I am trying to achieve something similar to below
I was able to achieve this but the next challange is I have multiple calculated values in a same text area, I want to pass the specific calculated value only when that particular value is clicked.
My text area has State as header and under each state there are multiple counties. each county is nothing but a calculated value in text area. I want to pass the value to document property when I click on a particular county, so each time a county is clicked the value in document property should be updated.
I am stuck with the part where I was able to pass it to doc prop but cannot make each value pass on click.
I also have accordian HTML script in text area.
I am trying to make a dashboard kind of look for the end users where they click the state and multiple counties appear and when the click on counties there is a R script which passes that doc prop to create a output dataset with only values from county, that again is used to build a dashboard where users see the values like std dev, avg, total population metrics based on data from output dataset.