how to set a flowfilter in main

how to set a flowfilter in main table and use it to filter data in subform?

You should be able to use GETFILTER for your parent form record to get the current filter applied to the field as a text value. You can then pass that value to a custom function in the subform, which sets the filter on the appropriate fields with the value passed to it.