Hi, sorry for the late reply.
A low key solution would to add an a few if statements depending on filial and add a click for that button .. but if you have many buttons that is not going to be feasible.
You can grab each button and compare the value with what you need. ( use get element with max items to something high )
If each button has something unique related to the filial, then you can inject variables into selector using {{ }} to just get the one you need.
So if you save filial into a string variable called filial then you can update the selector and use that value as {{filial}}