Sending SMS Through Twilio - Trouble with IF Statements
I am trying to send a message to only certain workers who are:
Active
and either
Foremen
or
Leadmen
The if statements below don't seem to be working like I thought they would.
Any thoughts?
- for each r in Worker_Information [Worker_Status1 = 2937369000000532011]
- {
- if (input.Enter_Worker_Designations = 2937369000000747003)
- {
- mob = "+1" + r.Mobile_Phone_Number.getAlphaNumeric();
- m = "<Red Iron Alert> " + r.First_Name + ", " + input.Message;
- resp = twilio.sms.send("Zoho1", mob, m);
- }
- }
- for each s in Worker_Information [Worker_Status1 = 2937369000000532011]
- {
- if (input.Enter_Worker_Designations = 2937369000001180009)
- {
- mob = "+1" + s.Mobile_Phone_Number.getAlphaNumeric();
- m = "<Red Iron Alert> " + s.First_Name + ", " + input.Message;
- //r = zoho.sms.send(input.Mobile, m);
- resp = twilio.sms.send("Zoho1", mob, m);
- }
- }