There's more to your picture than I can comment on. But something worth mentioning is that fluctuating and high blood sugars can really dehydrate the body and cause bowel problems (and I get that when my blood sugars play up, as a type 1. Especially going high can cause this diarrhia-blockage swing you speak of).
So while you try to solve this problem, make absolutely, positively, sure you drink plenty of water, in the realm of 2 litres a day, and eat daily fibre and roughage. No meds or anything else can replace these two basic activities for the basic functioning of your bowels. Good luck working out what else is going on.