I agree with @Vanilla about the natural way to express the thought. If you want some suggestions about the grammar issues in your two ideas:
宿題があるしてなきゃいけません。
You would need to add something like ので as a “because” to link the two sentences in here, and also it’s just しなきゃ, so
宿題があるのでしなきゃいけない – “I have homework, so I have to do it”. (Though this has drifted away from what you wanted to say.)
してなきゃ宿題をある。
This is closer to the original English in that it’s trying to modify the noun. But (1) you can’t use that contracted form in a relative clause, (2) the particle to use is still が, (3) してなきゃ is still wrong. So
Ahh thank you this makes sense, but then I was thinking that maybe just 宿題をしてなきゃwould get the point across. Like the fact you have homework would be implied.