Problem with the resultt after "each"

Problem with the resultt after "each"

  
Hello guys how can I extract a vector with all the records after I implement a each?

Hi Leidy,

You want a list with all the records? Is that what you want?

João Neves wrote:

Hi Leidy,

You want a list with all the records? Is that what you want?

Yes, I need a list with the all results of the query


Hi Leidy,

You can create a local variable set to type 'List' of 'Whatever type of record you are iterating over', or if there are multiple tables in use, set the variable to type 'List' of 'Record' and from there you can add the different entity types for the Record List.

Use the System Actions 'ListAppend' or 'ListAppendAll' to append the result of the queries to the local list.

Let me know if you run into any issues,

Justin

Justin Babel wrote:

Hi Leidy,

You can create a local variable set to type 'List' of 'Whatever type of record you are iterating over', or if there are multiple tables in use, set the variable to type 'List' of 'Record' and from there you can add the different entity types for the Record List.

Use the System Actions 'ListAppend' or 'ListAppendAll' to append the result of the queries to the local list.

Let me know if you run into any issues,

Justin

I'm sorry, i'm new in outSystems, so... What? How can I do that?


You are trying to take each time the SQL statement in the loop gets ran in the loop and put it into one list right?

If so, attach your OML and I can show you an example of how to do what I said in my last response.

Justin

Justin Babel wrote:

You are trying to take each time the SQL statement in the loop gets ran in the loop and put it into one list right?

If so, attach your OML and I can show you an example of how to do what I said in my last response.

Justin



Leidy Navarro wrote:

Justin Babel wrote:

You are trying to take each time the SQL statement in the loop gets ran in the loop and put it into one list right?

If so, attach your OML and I can show you an example of how to do what I said in my last response.

Justin



I can send you a general example, but thought it would be better to show you in your particular case, but I do not see the 'LeftJoin' web block in your OML, or any loops with a SQL statement in it.

Is there a particular place you would like me to show you this? Otherwise I will just send a general.

Justin