I need to automatically select the corresponding legend class in the TOC after executing an automated definition query on a feature class.
SDK reference is here with no examples: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/index.html#topic11994.html
I have the legend class value stored as a string, something like FY = '2021.'
The user selects an FY value from a pull-down that automatically applies a definition query to the feature class. I want to select the corresponding FY value in the TOC using mapview.selectlegendclasses method, but I don't know how to set up the argument from my string value.