function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Projects StCatsProjects StCats 

If two fields match, then return the value of a nominated field

I am new to Salesforce and trying to create formula to match two fields from two different objects. (Ticketbud_Event__r.Name and Ticketbud_Event__c).  If they match, return the value that is in the field Object: Ticketbud_Event__r.Ticketbud__External_ID__c, if not then enter "no match".  My formula is below but clearly is not working as shown by the screenshot.  Please can someone tell me what I am doing wrong!

IF(Ticketbud_Event__r.Name = Ticketbud_Event__c, Ticketbud_Event__r.Ticketbud__External_ID__c ,"no match")

User-added image
Durga PaavanDurga Paavan
Hi ,

You are comparing name(Meet the UN Ambassidor) with record id that's why you are seeing 'no match'. Also, Can you please let me know what is your requirement?

Thanks
Projects StCatsProjects StCats
Thanks Durga. So I am trying to see if The Ticketbud Events Name (Ticketbud_Event__r.Name ) e.g. Meet the UN Ambassador in the Object Ticketbud Event, is the same name as (equal to) the Ticketbud Tickets Object, Ticketbud Event name (Ticketbud_Event__c),e.g Meet the UN Ambassador.  If they ARE the same, then I want the value that is in the field of Ticketbud Object, Ticketbud Event, External ID (Ticketbud__External_ID__c) to be returned to the field in the object Ticketbud Ticket (Event_External_ID__c)   If  no then return "no match".  Hope this makes sense! Thanks if you can help.