It is not possible to potty train a tamagotchi. No matter how many times you get them to the toilet, they will never go to the pot on their own. If you don't put them on the toilet, they will poo on the floor.
tamadogg is right, but it IS worth knowing that if you DO get them on in time (when you see the wavy stink lines appearing around them) then you will have filled two happy hearts when they've finished!