What should I eat if I have constipation? Which food?

Tried more fiber? Add fiber, but cure depends on problem (do you have soft or hard stool?), circumstances under which constipation developed (dehydration, low activity, food intolerances, stressful times, ischemic gut, inflammatory colitis, past surgeries/ trauma with adhesions, rectal dysfunction), severity (stool volume, dehydration, bleeding, night-time awakening, weight loss), duration (acute vs. Longstanding?).