variables values lost suddenly

Hi all,

Variables suddenly began to lose value. I added a bit of code in preparation to fill a variable (RecordList) structured type. When I debug, in preparation with a break point at the end, same variable still holds the value loaded from the query, but when I click a button that redirects to another action, some of the  structure attributes loaded lose value and become 0.

We have other cases e another espaces where some variables only keep their value in actions where there are initialize, when invocation another action their values are lost.
Why? This never happened before in early 5.1 version. Now we use version 7, is there a limit of variables in same web screen?

Preparation END

Gravar START

Ps: Sorry my english ;)


Hugo Castro
Hi Hugo,

Is the value of those 2 attributes used anywhere in the application logic?
Looks to me that they are being optimized because they are not used.

João Rosado
Hi João Rosado,

Yes, the values are used to fill input paramenters in other querys in preparation and in another actions. The problem is that, and i don't know how and why, the values became empty (null or zero), as you can see on print screens.

Ps: If necessary i can provide you the *.oml.


Hugo Castro
Hi Hugo,

Aren't you making an assign to that variable in the middle of your code?
This occurs only for that variable?

Just as a test, have you tried to map these variables to a local copy of this structure? Only to verify that behavior in a variable that is not being used.
After doing this, debugging and yet can't take any elation of what is happening here you can put here the OML.

Best Regards,
Gonçalo Martins
Hi Gonçalo,

No, i'm not making assign in middle of my code. I did what you tell me to do (create a variable, testvariable, same record type, i even create one normal variable(idperiodicidade) that recieves one value of structed that becames empty.

Preparation End

Action Start

As you can see, now all de attributes became null. 

Find Usages

I search for find usages and as you can see only when i fill the variable.

This problem could be related with excess of variables, actions, web screens? Because i have many applications in same espace.

Ps:I hope you do not get confused with my explanation.


Hugo Castro
Is it possible to create a sample espace where it also happens?

You said "I search for find usages and as you can see only when i fill the variable.", does that mean that the variable is never read anywhere?
If they are not read, they will be optimized if they are not necessary.

João Rosado
João Rosado,

I only does that to prove Gonçalo (Only to verify that behavior in a variable that is not being used.) that i'm not making an assign to that variable in the middle of code.

But the variable rcdPeriodoReporte is used to fill input paramenters in other querys in preparation and in another actions.
@João Rosado: I just ask that to observe the behaviour in that variable.
However, since you are using it in the Preparation, the problem can be right there...
But the best way to check that is giving a eSpace with a use case where we can see the related behaviour and check on debugging where the variable is cleaned..
I would like to see an eSpace with this happening.
Till now looks to me the "normal" optimizer behavior.

Bottom line rule is: If in all actions a value is never read before it is written, then it not is stored/loaded. (optimized because it would not be needed)

If this is not true and still it is not storing the values, then it can be some sort of bug ...but really need to see the logic to confirm.

João Rosado
Hi agree with you, João,

Without an example I can't see any problem in the code that could origin this.
Lets way for an eSpace with an example of this.

Kind Regards,
Gonçalo Martins
Hi all,

I tried to explain but possibly was not enough, i even put prints to show what was happening. This espace has gone through several versions of OutSystems (v4, v5 and v7 recently) and has plenty applications, and this will probably have something to do with it, because we never had problems so far.

I can not send you the space, because it have multiple espaces references and the tables are distributed.

Our company has a few hours of support and I will contact OutSystems.
Thank you very much for your help, but because of the urgency can not waste more time trying to explain. I apologize if I have caused you a lost of your time.
Again thanks a lot.
Ps: I wiil put the post the eventual solution :)


Hugo Castro