Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Technology & Integration
ListAppend is populating 2 variables at the same time!
Community
›
Forums
›
Technology & Integration
ListAppend is populating 2 variables at the same time!
New Post
New Post
Carolina Bessa
Posted on 2011-02-15
Carolina Bessa
Rank: #447
Posted on 2011-02-15
debug2.JPG
Hi peeps!
I don't know what's happening... I have 2 RecordList variables exactly the same
DetailRL
DetailRLEmpty
In my loop, when I append a DetailR (record) to the list DetailRL (list), it's popullating DetailRLEmpty as well!
And it changes indeed, it's not only in the debug view - that I saw in other posts that it can differ.
See attached the debug, where both variables change!
How come?
Rafael Pereira
mvp_badge
mvp_label
Posted on 2011-02-15
Rafael Pereira
mvp_badge
mvp_label
Rank: #238
Posted on 2011-02-15
Solution
Hi Carolina, Somewhere on your code you have an assign using both recordlists ...probably on some init var Logic.... Recordlists works by reference and if in some point they was assigned with each other they will have the same values. Regards, Rafael Pereira
Solution
Carolina Bessa
Posted on 2011-02-15
Carolina Bessa
Rank: #447
Posted on 2011-02-15
Solution
debug1.JPG
Yes I was assigning the Empty to make it empty...
but at the end I found out that I was using too many variables.
OrderDetails are within OrderHeader, so no need to have the RecordList DetailsRL neither the empty one.
I append the record to directly to the list
OrderR
.
EDIFACT_ORDER
.
Details
And when I restart the loop, I remove the items (ListRemove) within the list to make it empty. This is more safe.
Now it's working, thank you!
btw I like your profile picture! Where are you from in Brazil? I'm from São Paulo. :D
Solution
Paulo Tavares
Posted on 2011-02-15
Paulo Tavares
Rank: #54
Posted on 2011-02-15
Solution
Hi Carolina,
Rafael responded correctly.
However, if you want to clear the list, instead of using the ListRemove 1 by 1, try using the ListDuplicate action, based on the empty list, and assigning the result to the list you want to clear. That should work as well, and seems to be better performance-wise :)
Regards,
Paulo Tavares
Solution
Carolina Bessa
Posted on 2011-02-15
Carolina Bessa
Rank: #447
Posted on 2011-02-15
Solution
Hi!!!
I'll check the ListDuplicate approach as well.
Thank you!!
Solution
Carolina Bessa
Posted on 2011-02-15
Carolina Bessa
Rank: #447
Posted on 2011-02-15
Solution
In my first example they were not assigned to eachother... I did the append of a single record into one of the recordlist and this record was appended in both lists.
:D
but ok, now I understand.
thanx!!
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...