You need to sign in to do that
Don't have an account?
Georgia2
Make field conditionally blank
I am trying to make a formula field blank based on a picklist value.
i.e. I have a custom object (RMA) that uses a formula to autopopulate the field 'Account Shipping Address' from the related Account. I then have a text field named 'Alternate Shipping Address' and a Ship To picklist with the two options: 'Account Shipping Address' and 'Alternate Shipping Address'
If the picklist equals 'Alternate Shipping Address' I would like the 'Account Shipping Address' to default to blank so there is only one address within the record.
Thoughts?
Thanks!
IF(ISPICKVAL(Ship_To__c, "Account Shipping Address"),
Customer_Contact__r.Account.ShippingStreet & br() & Customer_Contact__r.Account.ShippingCity & ", " & Customer_Contact__r.Account.ShippingState & " " & Customer_Contact__r.Account.ShippingPostalCode & br() & Customer_Contact__r.Account.ShippingCountry, NULL)
and you should be Good to Go. Let me know how/if it works out for you.
Also, you don't need that other Validation Formula now either.
All Answers
Hi
I don't really have a good example anymore. I tried several different formulas and either they had syntax errors or did not do what I was hoping it would.
Here is the one I have left:
and( ispickval(Ship_To__c , "Alternate_Shipping_Address__c "), not(ispickval ( Ship_To__c , "")) )
Does this help at all?
Thank you
Okay, it's a little bit of a guess without having all the information (field dataypes, object relationships, etc.)
But if your custom address field is a formula then you could give something like this a shot.
IF(ISPICKVAL(Ship_To__c, "Alternate_Shipping_Address__c"), Account Shipping Address, NULL)
Hi
I am sorry I just saw these replies. I have the "email me when someone replies" box checked but I don't receive anything.
Anyhow, the Ship To is a pick list on the Object with the two ship to options:
Account Shipping Address Alternate Shipping AddressThe Account Shipping Address is a text formula that pulls the address from the Customer Contact on the RMA object. And the Customer Contact is a lookup to a Contact.
The Alternate Shipping Address is a text field within the Object.
All three fields are located on the custom object. There is no relationship between the Object and the Account; only a lookup to the Contact as mentioned above.
I used this formula
IF(ISPICKVAL(Ship_To__c, "Alternate_Shipping_Address__c"), Account_Shipping_Address__c, NULL)
and I get this error. Error: Formula result is data type (Text), incompatible with expected data type (true or false).
Thank you!
Hi Georgia,
Sorry if I'm getting a little confused, but are you looking for a formula that will conditionally populate your Formula(text) Account_Shipping_Address__c field, or is that field populated by another formula, and you are looking to override that with a NULL is the user selects "Alternate Shipping Address" from the picklist?
Hi
The latter. The Account Shipping Address is populated by another formula (look up to contact address), and I want to override that with a NULL if the user selects "Alternate Shipping Address" from the picklist.
Thanks!
Hi
Here is the formula used to pull the "Account Shipping Address"
Customer_Contact__r.Account.ShippingStreet & br() & Customer_Contact__r.Account.ShippingCity & ", " & Customer_Contact__r.Account.ShippingState & " " & Customer_Contact__r.Account.ShippingPostalCode & br() & Customer_Contact__r.Account.ShippingCountry
Thank you
IF(ISPICKVAL(Ship_To__c, "Account Shipping Address"),
Customer_Contact__r.Account.ShippingStreet & br() & Customer_Contact__r.Account.ShippingCity & ", " & Customer_Contact__r.Account.ShippingState & " " & Customer_Contact__r.Account.ShippingPostalCode & br() & Customer_Contact__r.Account.ShippingCountry, NULL)
and you should be Good to Go. Let me know how/if it works out for you.
Also, you don't need that other Validation Formula now either.
Hi
I changed the Account Shipping Address to what you suggested and it only half worked. It made it blank no matter what the pick list value. It was blank whether the Ship To field was Account Shipping Address or Alternate Shipping Address.
So I changed the formula to "Alternate Shipping Address"
IF(ISPICKVAL(Ship_To__c, "Alternate Shipping Address"),Customer_Contact__r.Account.ShippingStreet & br() & Customer_Contact__r.Account.ShippingCity & ", " & Customer_Contact__r.Account.ShippingState & " " & Customer_Contact__r.Account.ShippingPostalCode & br() & Customer_Contact__r.Account.ShippingCountry, NULL)
Ok- it worked! I just had to change the formula to say (Ship_To__c, "Account Shipping Address (Above)")
since that was the pick list value... not "Account Shipping Address".
Thanks!
No problem...
Whose house??? RUN's House!!! Whose house??? RUN's House!!!