AnsweredAssumed Answered

Test Global Boolean Variable

Question asked by m.swanston on Aug 27, 2015
Latest reply on Aug 27, 2015 by m.swanston

OK, so this may be easy, but I'm just trying to be sure I understand this correctly.

 

I have an application written in FM14 hosted on FM server. Part of the process is to send an email to any number of internal users based on the results of a query. This is difficult to test on our test environment as we don't want it to send emails to potentially 50 plus users, especially if the content is of no relevance because it contains test records or spurious data. So I thought I could do two things:

Introduce a global variable at start-up: Set Variable [$$SendMail; True]

Wrap the email into an If Then Else loop that will send to all when $$SendMail is True, and a couple of recipients if False.

In other languages (C#/VB/VBA), a check on a Boolean would simply be If $$SendMail Then "Do This" Else "Do That" End If

My question - is a variable assigned as True truly Boolean in FileMaker and secondly, can I test for True in this way? Or is it:

If [$$SendMail = True]

Send Mail to All...

Else

Send Mail to Some...

End If

Or is there a better way to manage this?

Thanks

Martin

Outcomes