I have a form app that can be arrived at from various other apps (via links/ php buttons etc.)
So if you arrive at this app C from app A, clicking Exit should take you back to app A. If from app B, it should return to app B.
Does anyone have a tidy way of doing this?
First off, in Application => Navigation there is “Exit URL” but putting a variable here doesn’t work as it takes the value literally.
So in the calling apps I have a [comingfrom] global, which I’m trying to return to, set in App A and App B. Then in on AppInit of App C I have this
sc_url_exit("../[comingfrom]/[comingfrom].php");
However, the result of this is when it returns to the calling app (A or B) SC puts a new “Exit” button which was not in apps A or B before linking. So it ends up being quite confusing for users. Besides, I suppose its making the calling stack grow unnecessarily. I don’t want to resort to further hacks of checking if its a return and then hide the “Exit” on OnLoad event.
I’m hoping for a more elegant solution from anyone.