It is understandable but I would not say that kind of question is normal, because it sounds a bit complicated. In this case, I would suggest you ask first if the person has sons or daughters. Then you could avoid asking questions like 你有孙子女还是外孙子女还是都有？Or what happens if you don't know if they have either? Would it be normal to ask "你有孙子女孩是外孙子女吗?" in Chinese?
“子女”没问题，但“孙子女”没有听过。而且“孙子”是个常见词，容易歧义吧？I am a little surprised to see many native speakers think 孙子女 sounds strange/unnatural/weird. I wonder what your opinions regarding 子女 are. For example, someone asks how many kids do you have? 你有几个子女？Does it sound strange or do we have to ask separately 你有几个儿子？你有几个女儿? For me the answers are simply no. And to be best of my knowledge the closest translation of “grandkids” is 孙子女(和外孙子女 to include daughters’ children).