Is there a Global Variable which indicates what called an application?

Is there a simple way to see what applications opened the currently running application? I want to evaluate the calling app and return to it if it meets a criteria. Otherwise a redirection must occur.

I’ve not seen one - but if there isn’t then you could create this easily yourself.

In all the “calling” apps you want to track, at the point they call the app they can set your own global variable, e.g. [caller], with the identifier / name itself (of the calling app itself).

So if you have 3 apps (say “app_caller1”, “app_caller2”, “app_caller 3”) that can call a specific app (say “recipient_grid_app”) - at the point they are about to call “recipient_grid_app”, just before the call:

[caller] = "app_caller1";      // or caller2, 3 etc as appropriate

… and in the running app you can then have something like:

if ([caller] == "app_caller1") {
	
	// do some stuff maybe?
	if (some stuff is true) {
	   sc_redir("app_caller1");      // Or whatever app
	}

} elseif ([caller] == "app_caller2") {
	
	// do some stuff maybe?
	if (some stuff is true) {
	   sc_redir("app_caller2");     // Or whatever app
	}
	
} elseif ([caller] == "app_caller3") {
	
	// do some stuff maybe?
	if (some stuff is true) {
	   sc_redir("app_caller3");     // Or whatever app
	}
	
}

Yeah thanks. This is what I was hoping to avoid just due to laziness. :slight_smile:

Well there may be one - I just haven’t looked that hard - you can see ALL the possible globals etc by clicking on the File menu and then Data in Session. If it exist think it will be in that lot!

Cool idea. Thanks.

Actually - just stumbled on this…

This looks like you can define variable to store the caller’s name - not a lot of info on it so you’ll have to play as it’s not clear if this is local or global or whatever…

Capture.JPG

Right in front of me. Well done. I will try it in a day or two and provide feedback if nobody else has in that time. Thanks adz1111.