Code to get the SC project and version number

Hi. Before upgrading to SC9.7 the following code would work but does not now:

// set the following to get the SC project name and incremental version

$this->Test = new sec_Login_ini();
$this->Test->init();
[glo_project_name] = $this->Test->nm_grupo;
[glo_project_version] = $this->Test->nm_app_version;

This info is stored from the IDE into each project, and I need it at run time from the apps. Thanks,
Jamie

Hi Jamie. Been a long time. There are many issues, but my advise would be to scan the generated code using a tool like total commander, and see if you can find the differences. Locate it in your old code and see if you can find it in the new. KDiff3 or a similar compare might be able to assist you in that proces.

@onmountain This is working for me in 9.7 version on applicationinit app_login form

$app = new app_login_ini();
$app->init();

[version] = 'Versión ’ . $app->nm_app_version;

image

Thank you gbillot3,
That helped me. My working code is as follows:

$app = new sec_Login_ini();  // this corresponds to the specific app (sec_Login)
$app->init();
[glo_project_name] = $app->nm_grupo;
[glo_project_version] = $app->nm_app_version; 

Thanks!

1 Like

Hi Albert!
This is like old times :slight_smile:
Just sending you a dm on linkedin.
Peace, Jamie