@while with prompt not working

hi here i want to get the first saturdays between the given dates here i wrote this code@While(min<max1;@Prompt ([Ok];“hi”;n);

a:=@Date(@Year(min);@Month(min);1);

b:=@Weekday(a);

c:=7-b;

k:=@Adjust(a;0;0;c;0;0;0);

FIELD temp:=k;

temp:=@Text(temp);

r:=@Prompt([OkCancelEdit]; “Enter Your Name”; “Type your name in the box below.”; temp +“:”+r) ;

temp:=r;

min:=@Adjust(min;0;1;0;0;0;0)

)

but in the prompt i’m getting the first saturdays but in the field it is gettinng only the last value , what i have to do for it, here temp is the field in the form i enable multivaulues for the field also.

please help me in this regard

thanks in advance

Subject: @while with prompt not working

I understand you want in the field temp the list of dates from ini until the first saturday.

If this is correct, only need to change this line:

FIELD temp:=temp : k;

And…

… before te @while, initialize field temp:

FIELD temp := “”;

… change the variable called temp used by other to avoid error between the field temp and the variable temp.

Subject: RE: @while with prompt not working

Thanks i got it!!!

Subject: @while with prompt not working

Does the prompt do anything useful? If not, then this code will give you the first Saturdays between two dates:

dateList := @ToTime(@Explode(@ToTime(“[” + @Text(StartDate) + “-” + @Text(EndDate) + “]”)));

@Transform(dateList;“x”; @If(@Weekday(x)!=7|@Day(x)>7;@Nothing;x))

(and it’ll be faster than the @while version with the prompt removed.)