+ Start a Discussion
Karla Pliego 3Karla Pliego 3 

Create a formula for a workflow criteria for lookup field

Have a lookup field for states and want to create a workflow that if the lookup field is Maryland, then the workflow triggers. How can I write this formula? 
dandamudidandamudi
@karla
state object lookup field on which object?  
for example Account object as look up field on contact object, so your state object as look up on which object?
you want write on workflow rule on state object or parent object?
RamakantRamakant
Hi Karla,

Please create formula like below on your object. I am taking Contact object as a child and it has Account Lookup field. You can insert field from formula editor.
Account.Name  = 'Maryland'

PLease mark as best answer if helped.

Regards,
Ramakant
 
Karla Pliego 3Karla Pliego 3
Ramakant: 
I added the formula: 

Location_Region__r.Name = 'Maryland'

Got this error message: 

Error: <div class="message errorM3" id="spanError"><table class="messageTable" border="0" cellpadding="0" cellspacing="0"><tr><td><img src="/img/s.gif" alt="Error" class="msgIcon" title="Error"/></td><td class="messageCell"><div class="messageText"><div class="spanningError"><h4>You have reached the maximum number of 15 object references on Closing</h4>You must remove at least 1 relationship(s) in order to save this Workflow Rule.<div class="thisFormula">Related objects referenced in this Workflow Rule:<ul><li>Location_Region__r</li></ul> </div><div id="otherFieldsTwist"><div class="twistyHeader"><img src="/img/s.gif" alt="Show Section" class="showListButton" id="otherFieldsTwist_twisty" title="Show Section"/><span class="twistyText">Show References</span></div><table class="otherFields" border="0" cellpadding="0" cellspacing="0" id="otherFieldsTwist_showHide"><tr><TH scope="col">Name</TH><TH scope="col">Type</TH><TH scope="col">Related Object Reference</TH><TH scope="col">Last Modified Date</TH><TH scope="col">Last Modified By</TH></tr> <tr><td class="objectName" colspan="5">Closing</td></tr> <tr><td><a href="/01Q410000007iSn">1 - Seller Closing - Appraisal Not Ordered 10 days- VA</a></td><td>Workflow Rule</td><td>rethink3__Listing__r</td><td>7/7/2017 4:33 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000QrZLA">Acquisition_Close_Date_if_SHT_Acquisit</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/20/2017 2:07 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJH1">Address</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONZAC">Alarm</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 1:47 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONZAW">Alarm_Instructions</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 1:47 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSm">Buyer_2_Cell_Phone</a></td><td>Formula Field</td><td>Buyer_2__r</td><td>4/17/2017 8:24 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSr">Buyer_2_Email</a></td><td>Formula Field</td><td>Buyer_2__r</td><td>4/17/2017 8:25 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSc">Buyer_2_Phone</a></td><td>Formula Field</td><td>Buyer_2__r</td><td>4/17/2017 8:24 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSI">Buyer_3_Email</a></td><td>Formula Field</td><td>Buyer_3__r</td><td>4/17/2017 8:23 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KS8">Buyer_3_Phone</a></td><td>Formula Field</td><td>Buyer_3__r</td><td>4/17/2017 8:21 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DcV">Buyer_Agent_Cell_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent__r</td><td>4/16/2017 5:13 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DcQ">Buyer_Agent_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent__r</td><td>4/16/2017 5:12 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KRy">Buyer_Cell_Phone</a></td><td>Formula Field</td><td>rethink3__Buyer__r</td><td>4/17/2017 8:19 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KRt">Buyer_Email</a></td><td>Formula Field</td><td>rethink3__Buyer__r</td><td>4/17/2017 8:18 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KRo">Buyer_Phone</a></td><td>Formula Field</td><td>rethink3__Buyer__r</td><td>4/17/2017 8:18 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTB">Buyer_Selling_Agent_Assistant_Cell_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent_Assistant_CC__r</td><td>4/17/2017 8:28 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTG">Buyer_Selling_Agent_Assistant_Email</a></td><td>Formula Field</td><td>Buyer_Selling_Agent_Assistant_CC__r</td><td>4/17/2017 8:29 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KT6">Buyer_Selling_Agent_Assistant_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent_Assistant_CC__r</td><td>4/17/2017 8:27 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSw">Buyer_Selling_Agent_Cell_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent__r</td><td>4/17/2017 8:26 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0XX">Buyer_Selling_Agent_Email</a></td><td>Formula Field</td><td>Buyer_Selling_Agent__r</td><td>4/9/2017 4:42 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0Xc">Buyer_Selling_Agent_Phone</a></td><td>Formula Field</td><td>Buyer_Selling_Agent__r</td><td>4/9/2017 4:43 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJH7">City</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000VHVO1">City_sign</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>5/21/2017 6:22 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONZ9Y">Combo</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>10/10/2017 11:16 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000QrZNz">Commission_on_Net_Clause</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>3/15/2017 11:30 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONXlY">County</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 12:40 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/04Y410000003dAY">GR Notes</a></td><td>Workflow Field Update</td><td>rethink3__Listing__r</td><td>2/1/2017 10:26 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/04Y410000003dAE">GR YEs</a></td><td>Workflow Field Update</td><td>rethink3__Listing__r</td><td>2/1/2017 9:41 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000QrfwX">GR_Due_Dates</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/21/2017 10:06 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000Qrfwh">GR_Info_Confirmed</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/21/2017 10:07 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000PXgiR">GR_Yes</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/1/2017 9:33 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000Q3JHO">Ground_Rent_Redeemable</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/9/2017 12:53 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TJusy">Internal_Notes_on_Lockbox_and_Alarm</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>4/8/2017 3:22 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTk">Lender_Co</a></td><td>Formula Field</td><td>Lender_Company_Contact__r</td><td>4/17/2017 8:36 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0Xr">Lender_Co_Email</a></td><td>Formula Field</td><td>Lender_Company_Contact__r</td><td>4/9/2017 4:57 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0Xw">Lender_Co_phone</a></td><td>Formula Field</td><td>Lender_Company_Contact__r</td><td>4/9/2017 4:58 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHd">List_Price</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dcf">Listing_Agent_Assistant</a></td><td>Formula Field</td><td>Listing_Agent_Assistant_CC__r</td><td>4/16/2017 5:14 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dcp">Listing_Agent_Assistant_Cell_Phone</a></td><td>Formula Field</td><td>Listing_Agent_Assistant_CC__r</td><td>4/16/2017 5:16 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dck">Listing_Agent_Assistant_Phone</a></td><td>Formula Field</td><td>Listing_Agent_Assistant_CC__r</td><td>4/16/2017 5:15 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KRj">Listing_Agent_Cell_Phone</a></td><td>Formula Field</td><td>Listing_Agent__r</td><td>4/17/2017 8:16 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0XS">Listing_Agent_Email</a></td><td>Formula Field</td><td>Listing_Agent__r</td><td>4/9/2017 4:40 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0XN">Listing_Agent_Phone</a></td><td>Formula Field</td><td>Listing_Agent__r</td><td>4/9/2017 4:35 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000PYyk3">Listing_Type</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/3/2017 2:30 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000Q1U7U">Location</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>3/1/2018 11:27 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONZ9n">Lockbox_Instructions</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 1:45 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHh">Marketing_Description</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHj">Monthly_Rent</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHk">Monthly_Rent_per_sqm_sqft</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHr">Parking_Spaces</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000PYwtV">Preferred_Seller_Contact_Method</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/3/2017 1:06 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TIldV">Property_Is_Vacant</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>4/5/2017 9:34 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dao">Property_Owner_Cell_Phone</a></td><td>Formula Field</td><td>Property_Owner__r</td><td>4/16/2017 4:34 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DaP">Property_Owner_Email</a></td><td>Formula Field</td><td>Property_Owner__r</td><td>4/16/2017 4:32 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dae">Property_Owner_Phone</a></td><td>Formula Field</td><td>Property_Owner__r</td><td>4/16/2017 4:33 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJHu">Property_Type</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000VHOQU">Replacement_Items_List_Link</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>5/20/2017 6:51 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000Q3HT3">Replacement_Items_List_Received</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/9/2017 11:41 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000PYynM">SHT_Acquisition</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>2/3/2017 2:31 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONba9">Seller_2_CC</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/4/2018 1:56 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DbX">Seller_2_Cell_Phone</a></td><td>Formula Field</td><td>Seller_2__r</td><td>4/16/2017 4:40 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dc6">Seller_2_Email</a></td><td>Formula Field</td><td>Seller_2__r</td><td>4/16/2017 5:09 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DbS">Seller_2_Phone</a></td><td>Formula Field</td><td>Seller_2__r</td><td>4/16/2017 4:39 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONc0b">Seller_3_CC</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 2:26 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dbm">Seller_3_Cell_Phone</a></td><td>Formula Field</td><td>Seller_3__r</td><td>4/16/2017 4:41 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6DcB">Seller_3_Email</a></td><td>Formula Field</td><td>Seller_3__r</td><td>4/16/2017 5:10 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6Dbh">Seller_3_Phone</a></td><td>Formula Field</td><td>Seller_3__r</td><td>4/16/2017 4:40 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000Venrn">Seller_Is_A_Licensed_Realtor</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>5/28/2017 4:02 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONc1j">Seller_Nickname</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/30/2017 2:27 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJI0">Size</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJI1">State</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000SGaGV">TC_Email</a></td><td>Formula Field</td><td>TC_contact__r</td><td>4/17/2017 8:12 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000ONxqB">Tenant_Information</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>1/31/2017 12:26 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTL">Title_Company_Cell_Phone</a></td><td>Formula Field</td><td>Title_Contact__r</td><td>4/17/2017 8:34 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTf">Title_Company_Contact_CC_Cell_Phone</a></td><td>Formula Field</td><td>Title_Company_Contact_CC__r</td><td>4/17/2017 8:33 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTQ">Title_Company_Contact_CC_Email</a></td><td>Formula Field</td><td>Title_Company_Contact_CC__r</td><td>4/17/2017 8:32 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KTa">Title_Company_Contact_CC_Phone</a></td><td>Formula Field</td><td>Title_Company_Contact_CC__r</td><td>4/17/2017 8:32 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0Xh">Title_Company_Email</a></td><td>Formula Field</td><td>Title_Contact__r</td><td>4/17/2017 8:34 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000TK0Xm">Title_Company_Phone</a></td><td>Formula Field</td><td>Title_Contact__r</td><td>4/17/2017 8:34 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6i3g">Transaction_Coordinator_Phone</a></td><td>Formula Field</td><td>TC_contact__r</td><td>4/17/2017 7:55 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/04Y410000006ibM">Update Name</a></td><td>Workflow Field Update</td><td>rethink3__Listing__r</td><td>2/23/2017 11:46 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJI9">Year_Built</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJIA">Zip_Code</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N4100000U6KSD">buyer_3_Cell_Phone</a></td><td>Formula Field</td><td>Buyer_3__r</td><td>4/17/2017 8:22 AM</td><td><a href="/00541000000uGyk">karla</a></td></tr> <tr><td><a href="/00N41000006sJIB">sale_price_to_list_price</a></td><td>Formula Field</td><td>rethink3__Listing__r</td><td>9/16/2016 2:19 PM</td><td><a href="/00541000000uGyk">karla</a></td></tr> </table></div><script>new TwistyElement('otherFieldsTwist_twisty', 'otherFieldsTwist_showHide', 'Show References', 'Hide References', true);</script></div></div></td></tr> </table></div><script>if (window.sfdcPage) sfdcPage.registerMessage('spanError');</script>
RamakantRamakant
Hello,

If you read above error carefully :
</h4>You must remove at least 1 relationship(s) in order to save this Workflow Rule.<div class="thisFormula">Related objects referenced in this Workflow Rule:
You need to work on this.

Regards,
Ramakant

 
dandamudidandamudi
@Karla
in your Closing object has Max 15 references, you should remove or follow below link to get rid above error.
https://help.salesforce.com/articleView?id=000171213&language=en_US&type=1