A Back Button?

Hi,
I need to create a Back button. Making button that displays the text “Back” is easy enough. Getting it to actually go back, thats another story. It doesn’t matter to me whether it’s thru a series of loops or something else. This is basically the script so, but its not close to working.
This one is driving me nuts, so any thoughts are more than appreciated. Or if someone knows that this CAN’T be done, that’d be great to know too.
Thanks!


set album to text returned of (display dialog "Album:" with title "Album Level: Album" default answer "" buttons {"Cancel", "Back", "Next"})
set playlistTitle to text returned of (display dialog "Playlist Title:" with title "Album Level: Playlist Title" default answer "" buttons {"Cancel", "Back", "Next"} cancel button "Cancel")
if playlistTitle is "Next" then
	set playlistTitle to ""
	set indexAlias to text returned of (display dialog "Index Alias Terms:" with title "Album Level: Index Alias Terms" default answer "")
	
else
	set a to "Back"
	set album to text returned of (display dialog "Album:" with title "Album Level: Album" default answer "" buttons {"Cancel", "Back", "Next"})
	
end if


Do you mean your trying to create a button that goes to the previous track?

Sorry, I meant a button that goes to a previous display dialog. Like a back button in your browser.
The content the user is entering is music related but actually no direct interaction with music. This is merely to ease the date entry process.
Thanks!

The usual way to handle that is:

repeat
	set {b, t} to {button returned, text returned} of (display dialog "make some choice" buttons {"Cancel", "Go Back", "Next"} default answer "")
	
	if b is "Next" then
		exit repeat
	end if
end repeat
display dialog "You chose Next"