Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Ouen Worth
3
Views
4
Comments
Solved
Record input parameter and local variable record dropping values
Question
Usability
This is a strange behaviour that we uncovered while a new developer was going through the training material.
It is not recommended practice to pass records to a web screen which is what junior was attempting to do and in the process arrived at a pattern that used a screen action to pass the record to the web screen.
The passed parameter is then used to populate some expressions on the web screen. To troubleshoot the behaviour, the input parameter was mapped to an internal variable.
When the preparation breakpoint is hit during debug, the parameter and the variable both contain values. The expressions on the web screen get populated and everything looks good.
When calling a screen action from a button and the breakpoint is reached, the variable is empty and the parameter only has the values that were in the expressions on the web screen.
Is there a logical explanation for this behaviour or is it a bug?
Attached is the OML for reference.
Thanks
?Ouen
RecordInputScenario.oml
João Rosado
Staff
Solution
Hi,
That description sounds like Optimizer related. When calling a screen action the debugger won't be able to see variables that are never read (because the optimizer determines that they are never needed so they are not presisted between calls)
Was this actually causing a problem or only "could not see the values while debugging"?
Regards,
João Rosado
See solution in context
Pramod Jain
MVP
I also had the same problem and then i change my implimentation. But this still is my question.
João Rosado
Staff
Solution
Hi,
That description sounds like Optimizer related. When calling a screen action the debugger won't be able to see variables that are never read (because the optimizer determines that they are never needed so they are not presisted between calls)
Was this actually causing a problem or only "could not see the values while debugging"?
Regards,
João Rosado
Pramod Jain
MVP
For osme reason if i want to save that record i didnt get the values to save in the record in screen action.
Ouen Worth
I have confirmed that it is just a quirk in the Studio debugger as highlighted by João.
Attached is an updated example where the input parameter is returned to the calling webscreen as a string and all the data is present in the returned string.
Thanks
Ouen
RecordInputScenario.oml
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...