private int setSecDataArr(HashMap m, ArrayList arr, boolean isEvent) {
        
        int idx = setSecDataArr(m, arr);
        
        if (idx != 0 && isEvent && getValueOr(m, "date", "").equals("")) {
            return -1;
        } else {
            return idx;
        }
    }
private int setSecDataArr ( HashMap m , ArrayList arr , boolean isEvent ) { int idx = setSecDataArr ( m , arr ) ; if ( idx != 0 && isEvent && getValueOr ( m , "date" , "" ) . equals ( "" ) ) { return - 1 ; } else { return idx ; } }
Get index value of the record and set new id value in the array.
In addition, it will check if the event date is available. If not, then
return 0.

@param m sub data
@param arr array of sub data
@return current index value of the sub data