Question ED Coder · Nov 6, 2018

Hi,

I have a global that holds users name and date of birth.

I would like to loop through them and check if the date of birth is more than 2 years based on todays date

so I have ^checker("under2", "Eric David", "02-05-2018")

I want to check the birthdate based on todays date to see if it is greater than 2. How do I access the birthdate in the global

Please can you advice

I tried :

set values = $order(^checker("under2"))
set td = $zdate($horolog, 3)
set ol = $p(^checker("under2"), ",", 3) // this does not work
while (values ' = "")
{
set difdays = $system.SQL.
9
0 1386
Question ED Coder · Nov 6, 2018

Hi, I want to create a service which on start will simply go through a list of values in a global and compare dates. If criteria is met, it will send an email.

But what kind of Adapter do I use? I see SQL, FILE, HTTP etc..etc.. But I dont want to use them

Please can you advice on how I should go about this?

Should I create a BS. Class and do onAdapterTASK() and simply build a method? Even then it is asking the kind of adapter I want

Would appreciate some guidance on this

Regards,

Eric

8
0 529
Question ED Coder · May 16, 2018

Hi,

I'm trying to send emails to a distribution list but it doesnt work. However, When I send emails to individual emails it works fine. Is there a configuration that I need to be checking or enable?

I'm doing it within a Business Operation:

Set SendList="grouplist@email.com, eric@email.com"

f a1=1:1:$l(SendList,",") s ToAdd=$p(SendList,",",a1) d  
.Set Mailer = ##CLASS(%Net.SMTP).%New()
.Set Mailer.smtpserver = "10.xx.200.000"

.Set Msg = ##class(%Net.MailMessage).%New()
.Set Msg.From="manager@email.com
.Do Msg.To.Insert(ToAdd)
.Set Msg.Subject = "Sample Email to distribution list"
.
7
0 717