Hi folks,
Have a problem I don't get around:
This is a multi tenant app where I set 4 global vars containing the tenant_ID, plus user name and user_role (can be admin or manager or user).
I am starting this app via an xDialog, say, 'Tenant_Login' where the user selects a tenant, plus enters his/her user ID and password. When the login is OK, I set the above mentioned global vars (all DIM'med like DIM GLOBAL gvTenant_ID as C) to be used as base filters on subsequent forms, plus open a menu form containing an embedded xDialog which is a toolbox from which I start the various forms or scripts etc.. This is all working flawlessly.
BUT:
On this menu form's embedded xDialog-Toolbox, there is an item called 'change tenant' which starts the above mentioned xDialog 'Tenant_Login' again and thus enabling the user to select another tenant plus login credentials which - in turn - sets the global vars to new values, used to set form base-filters and the like.
And the problem is:
Whenever I launch this xDialog 'Tenant_Login' from within this embedded xDialog by selecting 'change tenant', the global vars do NOT get updated, but keep their former values! As many times as I start the login dialog by itself, all global vars get set just fine, but not when launched from within the embedded xDialog.
From what I see through the debugger, my xDialog 'Tenant_Login' does set the global vars OK, but obviously not outside its's (or the embedded xDialog's?!) context.
I am truly stumped!
Thanks for each and every input on this!
Have a problem I don't get around:
This is a multi tenant app where I set 4 global vars containing the tenant_ID, plus user name and user_role (can be admin or manager or user).
I am starting this app via an xDialog, say, 'Tenant_Login' where the user selects a tenant, plus enters his/her user ID and password. When the login is OK, I set the above mentioned global vars (all DIM'med like DIM GLOBAL gvTenant_ID as C) to be used as base filters on subsequent forms, plus open a menu form containing an embedded xDialog which is a toolbox from which I start the various forms or scripts etc.. This is all working flawlessly.
BUT:
On this menu form's embedded xDialog-Toolbox, there is an item called 'change tenant' which starts the above mentioned xDialog 'Tenant_Login' again and thus enabling the user to select another tenant plus login credentials which - in turn - sets the global vars to new values, used to set form base-filters and the like.
And the problem is:
Whenever I launch this xDialog 'Tenant_Login' from within this embedded xDialog by selecting 'change tenant', the global vars do NOT get updated, but keep their former values! As many times as I start the login dialog by itself, all global vars get set just fine, but not when launched from within the embedded xDialog.
From what I see through the debugger, my xDialog 'Tenant_Login' does set the global vars OK, but obviously not outside its's (or the embedded xDialog's?!) context.
I am truly stumped!
Thanks for each and every input on this!
Comment