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
Appending to RecordLists Problems
Community
›
Forums
›
Technology & Integration
Appending to RecordLists Problems
New Post
New Post
Shupi
Posted on 2013-04-30
Shupi
Rank: #12149
Posted on 2013-04-30
Hello all,
I have three RecordLists namely RecListTaskInstall, RecListProvActivate and RecListPerformInstall. These three are contained within a ForEach loop that loops through an advanced query result list.
For each record of the advanced query, I check if it meets a certain criteria, and then appends it to one of these three record lists. This is where the problem happens, a record is appended to all three records even though when I debug only one IF path is followed meaning the appending should be done on only one of the record lists.
This means the three record lists end up with similar (data) records which is wrong. Where am I missing it? I have attached a snap shot of this code.
Shupi.
Miguel Grilo
Posted on 2013-04-30
Miguel Grilo
Rank: #2380
Posted on 2013-04-30
Solution
Hi Shupi , i sugest that you clean the record to append for each record on the cycle.
Best Regards Miguel Grilo
Solution
Shupi
Posted on 2013-04-30
Shupi
Rank: #12149
Posted on 2013-04-30
Solution
Hi Miguel,
Thanks for the fast reponse. How do I clean the record?
Regards,
Shupi.
Solution
Miguel Grilo
Posted on 2013-04-30
Miguel Grilo
Rank: #2380
Posted on 2013-04-30
Solution
Hi Shupi, you have two ways or create a local variable with the same record type and assign to the record to clear or just put an assign and put all record atributes to null values.
With is when you enter on the cycle the record is clean and ready to append.
Regards Miguel Grilo
Solution
Shupi
Posted on 2013-04-30
Shupi
Rank: #12149
Posted on 2013-04-30
Solution
Hello Miguel,
Is there a flaw in the platform that causes that or something is wrong in my code?
Regards,
Shupi.
Solution
Miguel Grilo
Posted on 2013-04-30
Miguel Grilo
Rank: #2380
Posted on 2013-04-30
Solution
What is the record that you append to the lists?
The record that came from query?
Check if you are selected the right list and the right record on the append action
Regards
Solution
Shupi
Posted on 2013-04-30
Shupi
Rank: #12149
Posted on 2013-04-30
Solution
Hi Miguel,
Please see the definitions below:
Solution
Miguel Grilo
Posted on 2013-04-30
Miguel Grilo
Rank: #2380
Posted on 2013-04-30
Solution
I mean in the for each flow, when you call the append action
Best Regards
Miguel Grilo
Solution
Shupi
Posted on 2013-05-02
Shupi
Rank: #12149
Posted on 2013-05-02
Solution
Hi Miguel,
Sorry to reply late.
As you can see from the diagram below, this is the query recordset and I wanna put these records in different lists 'JobSpecName'.
I really don't understand what's going on.
Regards,
Shupi.
Solution
João Rosado
Posted on 2013-05-03
João Rosado
Rank: #13
Posted on 2013-05-03
Solution
Hi Shupi,
My guess is that on the begging of the flow you are assigning to all the 3 variables the value of the RecListAlwaysEmpty. That causes them to "point" to the same recordlist.
Not sure why you need to make them empty (because on the beginning of an action they will be empty anyway), but if you really need it use the ListDupplicate (from the "System" reference) action with the RecListAlwaysEmpty. That action will return a separate instance of the recordlist and you can reuse.
Regards,
João Rosado
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...