AnsweredAssumed Answered

Table In Lieu Of Case Command

Question asked by Fred_3 on May 6, 2015
Latest reply on May 6, 2015 by Fred_3

Title

Table In Lieu Of Case Command

Post

I have the following script that works, but would like to replace the CASE command with a table:
 
If [ List Parameters::Mobile Numbers ≠ "-" ]
Set Error Capture [ On ]
Set Field [ <Table Missing>; "" ]
Set Variable [ $$MOBILENUMBER; Value:Case ( List Parameters::Mobile Numbers = "Fred" ; "8884532180" ; List Parameters:: Mobile Numbers = "Mike" ; "8886542323" ; List Parameters::Mobile Numbers = "Tom" ; "8887654323" ) ]
Set Variable [ $$SCRIPT_TRIGGER; Value:"Off" ] End If
Send Mail [ Send via SMTP Server; To: $$MOBILENUMBER & "@txt.att.net"; Message: Residential Customers::Last Name & ", " & Residential Customers::First Names & ¶ &
Residential Customers::Street Address & ¶ &
Residential Customers::City & " " & Residential Customers::Zip & ¶ &
Residential Customers::Phone & ¶ &

Residential Customers::Number of Systems & " Systems"; Name: "Douglas Mechanical, Inc."; Email Address: "douglasmechinc@gmail.com"; Reply-To Address: "douglasmechinc@gmail.com"; SMTP Server: "smtp.gmail.com"; Port: 465; Use SSL; Authentication Type: Plain Password; User Name: "douglasmechinc@gmail.com"; Password: "**********"
 
My thinking is that if the names and numbers are in an easily viewable table, the numbers could be easily changed by others without changing the script.  The table would be as follows:
 
EMPLOYEES table
 
NAMES        MOBILE NUMBERS
Fred             8884532180
Mike             8886542323
Tom              8887654323
 
Any thoughts?  And thank you for your time.
 
Fred

Outcomes