
5 answers
Hi Marry,It's very much possible to use an if statement in a custom formula. Please look at this code snippet. The below code snippet opens a google US search if the country is USA else google UK search. {! IF(Sample.BillingCountry = "US", "http://maps.google.com/maps?q="&Sample.BillingStreet& "+"&Sample.BillingCity&"+"&Sample.BillingState&"+"&Sample.BillingCountry, (IF(Sample.BillingCountry = "UK", "http://maps.google.co.uk/maps?q="&Sample.BillingStreet &"+"&Sample.BillingCity&"+"&Sample.BillingCountry, "http://maps.google.com"))) }This is from the help article: https://help.salesforce.com/articleView?err=1&id=customize_functions_i_z.htm&type=5Please let me know why you think you cannot use an if statement.Pradeep This worked perfectly.... (passing Name OR Site value depending...... to a flow's variable.... so do not have to complicate the flow quite as much. Hey Pradeep,my bad, its not possible to use actions like 'LogaCall' in an if statment. Thanks for your effort. I will mark your answer as best answer, because my question was formulated incorrectly. Shame on me ;)Greetings Marry Hi Pradeep,thanks for your reply. Unfortunately, it is not possible to use a if statement in a custom button formula. I appreciate your help,Marry Marry-You should be able to do this using Custom buttons. Create the custom button for the object by navigating to Account- Object-> 'Button, Link & Actions'. When you create the button use the formula to compare the object values.Defining custom button:https://help.salesforce.com/articleView?id=defining_custom_links_fields.htm&type=5Custom button with a formula https://help.salesforce.com/articleView?err=1&id=customize_functions_i_z.htm&type=5Finally, use the custom button in your account page layout.Let me know if that helped?Pradeep