Appending to RecordLists Problems

Appending to RecordLists Problems

  

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.

Hi Shupi , i sugest that you clean the record to append for each record on the cycle.

Best Regards Miguel Grilo
Hi Miguel,

Thanks for the fast reponse. How do I clean the record?

Regards,

Shupi.
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
Hello Miguel,

Is there a flaw in the platform that causes that or something is wrong in my code?

Regards,

Shupi.
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
Hi Miguel,

Please see the definitions below:


I mean in the for each flow, when you call the append action

Best Regards
Miguel Grilo
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.
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