You need to sign in to do that
Don't have an account?
Jeff Onsrud
Error: Formula result is data type (Location), incompatible with expected data type (Text)
I am trying to create a field that shows consolidated address information based on which field has information in it. Show the Shipping Address unless it is blank, then show the Billing Address. I want to make several separate fields - Address, City, State, ZIP, Country. I am getting the error: "Formula result is data type (Location), incompatible with expected data type (Text)".
My formula is: IF( ISBLANK( ShippingAddress ) , BillingAddress , ShippingAddress)
There is no option in Formula to make the type "Location" only "Text".
Any help on how to make the formula would be appreciated.
My formula is: IF( ISBLANK( ShippingAddress ) , BillingAddress , ShippingAddress)
There is no option in Formula to make the type "Location" only "Text".
Any help on how to make the formula would be appreciated.
You may need to check this:
http://www.salesforce.com/us/developer/docs/api/Content/compound_fields_address.htm
Does anyone know of a work around way to accomplish the goal (of a formula field that shows 1 of 2 addresses depending on if one is filled in or not)?
I am not sure you have fixed the issue or not: Here is solution and it may work for you:
IF( ISBLANK( ShippingAddress ) , BillingStreet+Br()+BillingCity+BR()+BillingState+' '+BillingPostalCode , ShippingStreet+Br()+ShippingCity+BR()+ShippingState+' '+ShippingPostalCode)
This might be useful. If one need to bring in the mailing address from account to custom object via lookup field then one can use the below
Create a custom field on the Custom object.
Datatype = FORMULA
Result = TEXT
Formula =
Lookupfield_r.BillingStreet + BR() +
Lookupfield_r.BillingCity + ", "+
Lookupfield_r.BillingState +" " +
Lookupfield_r.BillingPostalCode + BR() +
Lookupfield_r.BillingCountry
For example addresses in many countries in Europe list the postal code first, then the city and state. i suppose you could get fancy and write some sort of concatenated formula field that figures this out, but really?
What's frustating is Salesforce already does this and displays the addresses correctly based on location but there is no way I have yet discovered to output this formatting to say, do a postal mailing.
Something doesn't feel right here. There must be a way to get out the formatted address to print labels. What is it?