Grey field work but Data Element disappears

Facing problem there is duplication in COC and data element not disabling (grey field) from front end
but we try from api like https://xyz/api/29/sections/jmEULk1mTWz?mergeMode=REPLACE (grey field WORKS but) all other Data element disappears
except BCG in section sUmHA0uSjn9 (can any one looks into)

{
“disableDataElementAutoGroup”: false,
“lastUpdated”: “2023-05-31T13:15:21.258”,
“id”: “jmEULk1mTWz”,
“showColumnTotals”: false,
“created”: “2022-09-07T11:09:16.603”,
“attributeValues”: [],
“sortOrder”: 16,
“name”: “Immunization”,
“showRowTotals”: false,
“dataSet”: {
“id”: “hAh5iy2P6i8”
},
“lastUpdatedBy”: {
“id”: “M5zQapPyTZI”
},
“greyedFields”: [

    {
        "dataElement": {
            "id": "sUmHA0uSjn9"
        },
        "categoryOptionCombo": {
            "id": "xnxcazPEJWw"
        }
    },
    {
        "dataElement": {
            "id": "sUmHA0uSjn9"
        },
        "categoryOptionCombo": {
            "id": "L6vPrflf1VC"
        }
    },
    {
        "dataElement": {
            "id": "CpgaDx60Ztt"
        },
        "categoryOptionCombo": {
            "id": "L6vPrflf1VC"
        }
    },
    {
        "dataElement": {
            "id": "CpgaDx60Ztt"
        },
        "categoryOptionCombo": {
            "id": "xnxcazPEJWw"
        }
    }
    
],
"translations": [],
"dataElements": [
    {
        "id": "sUmHA0uSjn9"
    
    }
],
"indicators": []

}

Hi @arslan

Thank you for your post and welcome back to the community!

Would you please share step by step instructions to how this issue is happening? Which version of dhis2 are you using, and what is the app as well as which version of the app?

I would like to know please some more info. For example, how is this (grey field) configured? What is the API request that is being sent?

Thanks!

dhis2 version is 2.38.1.1
data element BCG which has 4 CAT-COMB(0,1,2,3) these cat comb also attached with other Data Elements when i disable 0, 2, 3 in GREY FIELD of BCG THEY ARE NOT DISABLING and allow entry so i tried disabling from api when i disable it all other data elements in section disappears except BCG (through postman)

Thanks for @Gassim for support the problem is solved. i was not adding other data element id in

"translations": [],
"dataElements": [
    {
        "id": "sUmHA0uSjn9"
        "id": "you have to add id of other data elements here to retain in section"
    }
],
"indicators": []
1 Like