List Records Table and Record List variable using Current record to populate

I have been trying to resolve an issue with a variable populating a list record.  The variable is the source of the record list.  When the list record iterates through the variable, all of the records are not displayed in the table.  The list table always the displays the variable.current first, and then picks up the remaining records.

Example:

If the variable contains 3 records, when displayed in the List Records table, the following are displayed:

  1. variable.Current
  2. variable[1]
  3. variable[2] - this is equal to variable.Current

As you can see variable[0] is not being displayed.I have included screenshot below to help tell the story. How do I start populating the List Records table with the first variable record?  



Attributes of the variable


Filling out the List Records table




Result of List Records table


Thank you for your assistance.


That is quite strange.

In the Preparation, you are not iterating through the list in any way, i.e. doing a ForEach, or assigning anything related to the ValidationMessages list in any way?

Dylan Heunis wrote:

That is quite strange.

In the Preparation, you are not iterating through the list in any way, i.e. doing a ForEach, or assigning anything related to the ValidationMessages list in any way?

I know. I can't seem to figure this out.  Here is the preparation.


Hi Tim,


It's bit strange, could you please replace the actual implementation with the below code (just for trial).


Regards,

Benjith Sam

Hi, friend. 

How are you feeding the sourcel list variable? I can't see in those images.

To fill your list variable, use the ListAppend ou ListAppendAll (in case of taking values from aggregate).

Then your table records will be correctly filled.

Benjith

I re-coded the preparation based on your suggestion and the issue still occurs.


Lenon

Within a server action the values are added using ListAppend (see below). The output of the server action was previously directly assigned to a validation variable.  This was changed to ListAppendAll.  The issue still occurs.




Hi! 

Have you discovered why in the ValidationMessages the first record in the current records is different from the first record in the list. As the current row number is zero, the current and the [0] records should be equal because they are the same.

The "Validation" variable have the same problem?

Graça

Graça,

I still have not figured out why this is not working. The server action's output parameter has the CurrentRowNumber = 2.  When this parameter is AppendAll to the Validation variable, the CurrentRowNumber=0.

You might be on to something.  

Thanks.

Hi Tim, 

If possible, can you please share the application oml, to see the exact code,  which will be helpful for everyone to analyze it.


Thanks,

LK 

Strange! "Append all" shouldn't be influenced by the "current row number" from the source list. 

Can you see in the "service center" if there is an error during the execution? 

Have you seen if you have "broken" eSpaces in you application. Some times in that case the platform works strangely ?

I cannot remember any thing more. 

Sorry

Graça    

Solution

Hi Tim,


I tried to replicate the same mentioned scenario and in my case it's working as expected.

Check this: https://sbsam.outsystemscloud.com/ValidationMessage/SampleScreen.aspx

PFA - Included sample app .oml file


Could you try appending the record to List variable manually (using a ForEach Loop) as mentioned below: 


Hope this helps!


Regards,

Benjith Sam

Solution

Thanks Benjith. With the oml you provided I was able to finally get this working.  I needed to change the data types of the variables as shown below.  Still unsure why a text structure works. All other code associated to these variables were changed to match the change to the data type structure.

Hi Tim,


I'm happy that you got it solved. As per your use case, I would suggest to set the variable data type as List Of Text Structure type (Appropriate Data type -> Green Box) as mentioned below:

Reason: you only require a List of single structure (i.e. Text structure) as per the objective.


Regards,

Benjith Sam