Add String variables to an Array initialized with a fixed size

Hello,

With the goal of adding an Array of options to be used on an Input Dialog activity, I need to create an Array of Strings with 3 options only. So, far I already did 80% (or more) of the workflow which is basically like this:

I want in a certain Input Dialog the last day of the last previous 3 months from the date of today. For that, I made a While loop where I process today’s date and for each loop, I put inside the AddMonths method the iCount value with a minus operator. Take a look:

Now, my goal is to add the value I get from each loop and save it into the Array I have created with a fixed size of 3 positions. As far as I can understand, there’s no AddToArray method in VB so… what’s the alternative? I know there’s probably a way of doing this with Lists but I would like to avoid that for the moment.

Cheers.

1 Like

Hi,

You can assign values to an Array like
strArray(0) = “1st value”
strArray(1) = “2nd value”

In your case, it will be like
sArrPrevMonths(icount) = dprevProcDate

2 Likes