Enable search functionality to include another variable in the variable-based dropdown in grafana 11.1

Hi, I am using Grafana and Prometheus. I have a variable-based dropdown that lists all the schools, and detailed information is populated into a table panel, including Location ID, Name, EOE, and Status.

Now, I want to filter the school dropdown by Location ID as well and update the table panel data accordingly. I have added a location_id variable with a query like this: label_values(node_uname_info{school="$school"}, location_id).

However, when I filter by school name, the location_id variable updates correctly in the URL. But when I filter by location_id, the variable remains empty in the URL, and no data is shown in the table panel.

I have added a text panel with JavaScript in HTML mode to update location_id when it is null and refresh the page. I modified the Grafana configuration to allow_embedding=true and content_security_policy=false, then restarted Grafana.

Despite these changes, location_id remains empty in the URL when I filter by location_id. How can I achieve this functionality? Please help.