@vakula
You are describing a process and a user interface.
Please clarify which is true:
A) You want the App to automatically go through the actual data in your datasource and change records that do not meet the criteria you mention and set them to Inactive. This is a data process action.
B) You want the user to either see the rows that do not meet the criteria as disable or not have them show at all. Or you want to provide a way for the user to then initiate a data action to mark them as inactive.
If A, I would consider a PowerAutomate flow to do this as you are relying on a User to open an app in order to change your records. This should be on a timed schedule instead.
If B, then this is a matter of filtering the Gallery of records.