Consulta sobre el uso de variables globales en formularios maestro-detalle

Tengo una consulta relacionada con el manejo de formularios maestro-detalle en ScriptCase.

En mis aplicaciones, usualmente el formulario detalle corresponde a una tabla diferente a la del maestro y cuenta con su propia lógica y procedimientos. Sin embargo, muchos de estos procedimientos en el detalle requieren información previamente cargada en la cabecera (formulario maestro).

Actualmente, estoy utilizando tres métodos para pasar información del maestro al detalle:

  1. Enlace desde la configuración de maestro-detalle.
  2. Campos virtuales creados en el formulario detalle para recibir valores del maestro.
  3. Uso de variables globales ([nombre_variable]).

El tercer método, mediante variables globales, es el que más utilizo debido a su practicidad, ya que no requiere la creación de campos adicionales, solo la declaración de la variable global.

Aquí es donde surge mi consulta:

Si tengo dos aplicaciones distintas , cada una con su propio formulario maestro-detalle, y ambas utilizan una misma variable global (por ejemplo, [m_variable_global] ), ¿qué ocurre si un mismo usuario ejecuta ambas aplicaciones al mismo tiempo?

Supongamos lo siguiente:

  • En la primera aplicación , el usuario inicia un procedimiento y en algún punto intermedio se guarda en [m_variable_global] el valor 1 .
  • Luego, sin cerrar o terminar el proceso en la primera aplicación , el usuario abre la segunda aplicación , que también utiliza la misma variable global, y allí se le asigna el valor 2 .
  • Finalmente, el usuario vuelve a la primera aplicación para continuar el procedimiento pendiente.

Mi duda es:
¿El valor de la variable global en la primera aplicación se verá afectado por el valor que se asignó en la segunda? Es decir, ¿la variable [m_variable_global] que inicialmente tenía el valor 1 ahora tendrá el valor 2 , comprometiendo la integridad del proceso iniciado en la primera aplicación?

Y, en caso de que las variables globales se pisen o compartan entre aplicaciones abiertas por el mismo usuario , ¿qué estrategia recomiendan para evitar este tipo de conflictos?

Agradezco mucho cualquier orientación o experiencia que puedan compartir al respecto.


I have a query related to the management of master-detail forms in ScriptCase.

In my applications, the detail form typically corresponds to a different table than the master and has its own logic and procedures. However, many of these procedures in the detail require information previously loaded in the header (master form).

Currently, I am using three methods to pass information from the master to the detail:

  1. Link from the master-detail configuration.
  2. Virtual fields created in the detail form to receive values from the master.
  3. Usage of global variables ([variable_name]).

The third method, using global variables, is the one I use the most due to its practicality, as it does not require creating additional fields, just the declaration of the global variable.

Here is where my query arises:

If I have two distinct applications , each with its own master-detail form, and both use the same global variable (for example, [m_variable_global] ), what happens if the same user runs both applications simultaneously?

Let’s suppose the following:

  • In the first application , the user starts a procedure and at some intermediate point [m_variable_global] is set to the value 1 .
  • Then, without closing or ending the process in the first application , the user opens the second application , which also uses the same global variable, and there the value 2 is assigned.
  • Finally, the user goes back to the first application to continue the pending procedure.

My question is: Will the value of the global variable in the first application be affected by the value that was assigned in the second? In other words, will the variable [m_variable_global] that initially had the value 1 now have the value 2 , thereby compromising the integrity of the process started in the first application?

And, in case global variables are overwritten or shared between applications opened by the same user , what strategy would you recommend to avoid this type of conflict?

I would greatly appreciate any guidance or experience you can share on this matter.