Add filter to browse

Hi,

You have helped me fantastic with adding multiple e-mail addresses to a bcc for a mail. My question now is is it possible to add a filter to this. Based on Reserveringen = ‘0’

Source is:

strBigEmail = ''
loop i=1 to records(Queue:Browse)
    get(Queue:Browse, i)
    if i=1
      strBigEmail = Queue:Browse.CUR:Email_adres
    else  
      strBigEmail = clip(strBigEmail) & ';' & clip(Queue:Browse.CUR:Email_adres)
    end
end
MSOutlook6.CreateItem('mail')
MSOutlook6.DisplayMessage()
MSOutlook6.SetBcc(strBigEmail)
MSOutlook6.SetSubject(CLIP(STA:Cursusnaam) & ' ' & STA:Start_Datum)
SETCURSOR

Thanks!

Hi Jos,

I’m not sure if i understand your problem, but if Reserveringen is in your Queue you can simply check for that after the get:

get(Queue:Browse,i)
if Queue:Browse.CUR:Reserveringen=‘0’ then cycle.

This way it won’t add the Email_adres when Reserveringen=‘0’ and go to the next get.
Be aware that now you can’t check for i=1 anymore, but you will have to set a LOC:First that keeps control of the adding the ‘;’ to the strBigEmail.

Good luck,
Rob

Hi Rob,

It worked, when the value was set CUR:Reserveringen = ‘1’ the ones without a reservation didn’t come in the BCC field. the ; still remains so no issue and didn’t have to set LOC:First.

Thanks!