Creating a list of strings in @Formula

Hi

I have 2 list fields on a form. In @Formula I want to create a third list field based on the content of the 2 first fields.

For instance:

List Field1 has content:

31-12-2008

30-12-2008

29-12-2008

24-12-2008

23-12-2008

22-12-2008

16-12-2008

15-12-2008

09-12-2008

08-12-2008

List Field2 has content:

“09:00-11:00”

“09:00-10:00”

“09:00-15:00”

“no time”

“no time”

“no time”

“no time”

“no time”

“09:00-12:00”

“no time”

The 3 new list field should be :

31-12-2008

30-12-2008

29-12-2008

09-12-2008

So what I want in the new field are the dates from the 1st field for which a time is filled in in the 2nd field on the same index position.

How can I do this in @Formula Language?

ANy help will be appreciated.

Regards

Subject: Creating a list of strings in @Formula

A for loop could be used here:If number of elements in field2 can be less than field1, you will have to check boundaries as well.

@If(List1 = @Nothing; @Return(“”); “”);

v1 := List1;

v2 := List2;

@For(n :=1; n<=@Elements(v1); n:= n + 1;

v3 := @If(v2[n] = “” | v2[n] = “no time”; v3 : “”; v3 : v1[n])

);

FIELD Result := @Trim(v3);

Subject: Creating a list of strings in @Formula

If you are just talking about concatenating the lists together, you can just use the + operator in formula.