Remove auto generated min-max value generation

when filling the datasets by the data entry app, min max validations are generated although we didn’t create any validation rule for outliers
I’ve investigated the dhis2 manual and community and found that the minimum maximum outlier detection are auto-generated and can be removed by using (Data Admin App > Min-max value generation > remove)
when I tried this solution it didn’t work and seems that this action is generating min-max validations instead of removing , as I’ve did fast check for the number of records in the minmaxdataelement table and it have been increased after this action.

Is there any way to remove these auto-generated min max validations ?

Hi @Marwa_Qadadha,

Welcome to the community! :tada:

It is possible that there is a cache issue! Would you please check again in an incognito/private browser mode? If it is working then this is a cache issue. Sometimes when you make changes, it is important to run the Browser Cache Cleaner app.

There are two options when creating min/max value range. One option (using the Data Entry app) is to create them manually and the other (using the Data Administration app) is to use auto-generated values; however, none of these are automatically set.

You are correct that if these values were auto-generated the steps you took will delete them, but if these ranges were somehow created manually then you would need to delete them from the Data Entry app:

  1. In the Data Entry app, open a data entry form.
  2. Double-click the field for which you want to delete the minimum/maximum value range.
  3. Remove any value from the fields for the Min limit and Max limit in the dialog that appears.
  4. Click Save


Thank you Gassim for your reply, it’s not a cache issue as I’ve tried cache cleaner for the dhis2 and the browser, also the min max validations not removed from the minmaxdataelement table.
For now to solve this issue the min-max validation is removed from the fields one by one in the data entry app, but it’s not a practical solution.

1 Like

Okay thank you @Marwa_Qadadha!

I do have another suggestion and hope it will help:

First I recommend you check using the API all the validation rules in your system, and make note of when these rules were created and who created these rules:

Now assuming you are able to find the validation rules in that API endpoint and have an idea which user created these and when. I think your next step to to send a DELETE request using API. When I tried to send the delete request using the endpoint directly the response was an error but when I tried to use the ID it worked.

For example, I sent a delete request to and it got deleted. So if you have thousands of validation rules, it’s preferable to get a developer to write a script that will send the requests using ID. (I wasn’t able to use the filter parameters for this endpoint which worked with the validationResults endpoint and this is why I’m suggesting to delete using ID)

You could get a list of validation rule IDs in a CSV format. For example, instance_URL/api/validationRules.csv?filter=id and then when the script is ready you can use Postman or any similar software.

I hope this suggestion helps. Know that I am still a beginner so perhaps someone from the core team developers or the community will add maybe a better solution or a correction to what I suggested. :pray: