Isn't it easier to make your id variable value lowercase.
var id = Lower(xyz);
or xyz.toLowerCase();
or match case of the ID attribute
collection.appendChild(<{"mycusTable"} Status={1} StatusChangeDate={date} _key="@ID" ID={id} xtkschema={"mycusTable"} />);
What seems to be the issue you are having?