If your beardie, whatever that may be, is having problems eating and evacuating his bowel, take it to the vet. How do we know what to do, the vet is trained to deal with this stuff and will have your, beardie? there to look at and diagnose.
What temperature is the enclosure? What substrate are you using? What foods are you offering? Has the BD had any issues in the past?
I will be able to answer any other questions, if you go back to my hub about bearded dragons, and post there. It would be much easier to help you. There is a comment box at the bottom, instead of using the 'ask a question' box on the right.
My temps are 110 basking and 75/80 warm. I offer him crix, locust, baby food, all of which he loved. Not had any issues with him before. Today he pooed again a tiny bit ,but doesn't have the energy to do anything. I put him on the basking spot and he moved to lay across the water bowl. I'm not sure why as I had put him in the bath about half hr earlier