Display App Name

Looking for solution to display App-Name (i.e in the header) or upon click on a button etc.
The bottom line is that I would like to have user tell me which App is opened on the screen (when reporting bugs, issues etc.). I have had something like this on the desktop application and it works great that way (as I do not have to ask the user for a screenshot). There is also a table called APPS, so showing the App-ID would be OK as well.

Any ideas ?

Event | onApplicationInit
$self = $_SERVER[‘PHP_SELF’];
[Applicazione]="App: ".$this->Ini->nm_cod_apl . “
” . "Versione ".$this->Ini->nm_app_version;

Layout | Header & Footer | Footer | value [Applicazione]

Thaks , but
Do I need any external LIBs ?
this doesn’t seem to work. I get errors…
there also seem to be some security issues with using PHP_SELF

Here a POST maybe can help you.

Hi
I’ve tried but none works.

How can I get the name of the application?

thanks

You can find the name of the current running app in

$this->Ini->nm_cod_apl

1 Like

Thanks.
I tried but null is received. May be a bug with my version 9.9.024…

so this works:

[App]="App: ".$this->Ini->nm_cod_apl;

now, how can we place this in every app header OR footer automatically ?
any ideas ?

This is the same code.

You cannot place it automatically in the header of footer.

Maybe you can put it in the footer of the menu and refresh the footer of the menu regularly with javascript

So if I open an App, then this App is active (so called “on-top”). How would I refresh the Menu when it is in the background ? I’m not sure if it is doable. I was just wondering if we could use an “include” clause
and store this in some LIB.

It would be nice to have a custom EPRESS EDIT feature to add some code to every single App in the project (ie. onInit event).

To add the app Name in the header you can use the following process

In onScriptInit of each app set the app name:

[App] = $this->Ini->nm_cod_apl;

Create a blank app that will return the App value, something like this

header('Content-Type: application/text');
echo "App: " . [App];

In the HTML header add the following

<script>                                           
window.onload = function() {
     $content = file_get_content('..\blank_app\index.php');
     document.getElementById('app-name-container').innertHTML = $content;
}  
</script>

I didn’t test this, it’s just a process to be fine tune for your specific situation.