This works:
set(locums)
loop until Access:Locums.Next()
loc:MobileNo = '27'& sub(clip(LCM:Cell),2 , len(clip(LCM:Cell)))
IF LEN(clip(loc:MobileNo)) = 11
loc:SendToBatch = clip(loc:SendToBatch)&','& clip(loc:MobileNo
END
loc:SendToBatch = sub(loc:SendToBatch,1,len(clip(loc:SendToBatch))-1)
This does not:
set(Locums)
!I# = 0
!!loop through file and concatenate numbers!
!loop until Access:Locums.Next()
! I#+=1
! !debuginfo('in the loop '&I# )
! loc:MobileNo = '27'& sub(clip(LCM:Cell),2 , len(clip(LCM:Cell)))
! debuginfo(loc:MobileNo)
! ds_Sleep(100) ! even this did not help
! IF LEN(clip(loc:MobileNo)) = 11 !and LOC:MobileNo = '27720541936'!this line does not work
!IF LEN(clip(loc:MobileNo)) = 11 and LOC:MobileNo = '27720541936' !this works - if I only send one number at a time
! do sendmessage
! end
!end
SendMessage ROUTINE
!LOC:PostURL = '
http://api.clickatell.com/http/sendmsg?user='&clip(loc:ClickatellUserName)&'&password='& clip(loc:ClickatellPassword)&'&api_id='&clip(loc:ClickatellAPIID) &'&to='&clip(loc:MobileNo) &'&text='&clip(loc:Message) !this does not work
LOC:PostURL = '
http://api.clickatell.com/http/sendmsg?user='&clip(loc:ClickatellUserName)&'&password='& clip(loc:ClickatellPassword)&'&api_id='&clip(loc:ClickatellAPIID) &'&to='&clip(loc:SendToBatch) &'&text='&clip(loc:Message) ! this works - concatenated all the numbers - but there is a limit to thi
ThisClient.Post(clip(LOC:PostURL),'') ! cookies, and fields automatically used.
DEBUGINFO(loc:MobileNo &' WAS SENT')
!do logSMSMessage
display()
! END