Global Variable pass only the first time from a Form to a Grid in Tabs

I’ve a form that shows exercises and is the first Tab;
the second Tab is a grid that shows all records that have the field exercises_id equal to the global variable [v_exercisesid] passed in OUT by the form;
whem I run the Tab app the first value passed by the form to the grid remains also when I navigate records in the form.
You can find the DB dump and the export of a simple project that reproduce the bug at the following link:

https://drive.google.com/folderview?..W8&usp=sharing

Roberto

Ranton,
in which events of the form do you set the global variable [v_exercisesid] passed as OUT? I think you need to set it in both the onLoad and onNavigate.
If you set it only in the onLoad event, this would explain why it is not updated.

I’ve this statement : [v_exercisesid] = {exercisesid}; in onApplicationInit, onNavigate, and onLoad Events in the Form Application.
On the Form Application in the section Application, Variabile Globale I have the v_exercisesid marked as SESSION, POST, GET and in OUT.

In the Grid Application I’ve the following SQL:
SELECT
muscles_targetid,
exercises_id,
muscle_sub_groups_id
FROM
muscles_target_ids
WHERE
exercises_id = ‘[v_exercisesid]’

the same of the Form Application in the section Application, Variable Globale set, except for the IN instead OUT.