Initialising and Using a Array

Initialising and Using a Array

  

Hi all,

    Can Outsystems initialise an array. For e.g. ["A","B","C","D"].

    I am trying to write a server action to generate checksums.


Thanks

Hello Yih,

Talking strictly about "OutSystems" programming...

There are no concept of "arrays" in OutSystems.
There are only the concept of "lists" (List), and the only way of initialize a list is to append values to it using ListAppend.

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hello Yih,

Talking strictly about "OutSystems" programming...

There are no concept of "arrays" in OutSystems.
There are only the concept of "lists" (List), and the only way of initialize a list is to append values to it using ListAppend.

Cheers,
Eduardo Jauch

I was also trying to create an array, specifically a two-dimensional array of Integers. I thought I could do this by creating two lists

1) ListA is a List of Integers

2) ListB is a List of ListA

However, when I tried to create ListB, my local variable ListA was not among the options of elements I could use to create ListB. Is there another way to do what I am trying to achieve?


Andrew Wan wrote:

Eduardo Jauch wrote:

Hello Yih,

Talking strictly about "OutSystems" programming...

There are no concept of "arrays" in OutSystems.
There are only the concept of "lists" (List), and the only way of initialize a list is to append values to it using ListAppend.

Cheers,
Eduardo Jauch

I was also trying to create an array, specifically a two-dimensional array of Integers. I thought I could do this by creating two lists

1) ListA is a List of Integers

2) ListB is a List of ListA

However, when I tried to create ListB, my local variable ListA was not among the options of elements I could use to create ListB. Is there another way to do what I am trying to achieve?


Hi Andrew,

I would say that the problem is the data type. 

ListB can't be of type List of ListA, as ListA is a variable, not a type.
You can try creating ListB as List of List of Integer.

In any case, this would not be very efficient, of course. 

A more "traditional" way would be to create a structure (named, for example, ListStructure) that holds a single attribute that is a List of integers.
Than you can create a variable that is of type List of ListStructure.

Cheers,

Eduardo Jauch