Quota limit automactically

I’m conducting a structured survey with a total sample size of 1200 respondents, distributed equally across three districts: Kathmandu, Bhaktapur, and Lalitpur. Each district has a target of 400 completes, equally divided between males and females (200 each). Within each gender group, we also have quotas based on socioeconomic classification (SEC) — Higher, Upper, Middle, and Lower — with each SEC category requiring 100 completes per district (e.g., 50 males and 50 females per SEC). My goal is to enforce these quotas dynamically during data collection so that no combination (e.g., “Kathmandu – Male – Higher”) exceeds its target, and the survey is automatically stopped once the total of 1200 is reached.
So how i achived this?
In short : Need quota limit if data exceed
need to end survey if gender, location, total sample and sec classification date exceed

@sudeep, this post discussed previously should help you solve your issue:

Thank you for your response.
But I am still a bit confused.
I go though the article you have provided.
And should I have to make two different form?
I have one form and want to set quota limit based on same form
For that should I have to upload same form twice or how can I achieved the quota limit.

@sudeep, you will need to link the same form to itself. You just need one form for this.