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
Ivan WinzerIvan Winzer 

Hide formula field text if picklist if not null

Ok so i have a formula field that is pulling the address infromation from the contact into the field. What i am trying to do is that if my 3rd party shipping picklist value is null (meaning nothing choosen) then the text will show, but if a selction has been made that the formula field shows in text. Does anyone think this is possible.

This is what i have but not seeming to work
 
AND( ISPICKVAL(X3rd_Party_Shipper__c = "", "",
if(LEN(Contact__r.OtherStreet)>0, Contact__r.OtherStreet& " " , "" ) & BR() &
if(LEN(Contact__r.OtherCity)>0, Contact__r.OtherCity& ", " , "" )&
if(LEN(Contact__r.OtherState)>0, Contact__r.OtherState& " " , "" )&
if(LEN(Contact__r.OtherPostalCode)>0, Contact__r.OtherPostalCode,"") & BR() &
If(LEN(Contact__r.OtherCountry) >0, Contact__r.OtherCountry,"")))

 
Best Answer chosen by Ivan Winzer
Parker EdelmannParker Edelmann
Try something like this:
IF(!ISPICKVAL(X3rd_Party_Shipper__c, ""),
if(LEN(Contact__r.OtherStreet)>0, Contact__r.OtherStreet& " " , "" ) & BR() &
if(LEN(Contact__r.OtherCity)>0, Contact__r.OtherCity& ", " , "" )&
IF(LEN(Contact__r.OtherState)>0, Contact__r.OtherState& " " , "" )&
IF(LEN(Contact__r.OtherPostalCode)>0, Contact__r.OtherPostalCode,"") & BR() &
IF(LEN(Contact__r.OtherCountry) >0, Contact__r.OtherCountry,""),
NULL)

 

All Answers

Parker EdelmannParker Edelmann
Try something like this:
IF(!ISPICKVAL(X3rd_Party_Shipper__c, ""),
if(LEN(Contact__r.OtherStreet)>0, Contact__r.OtherStreet& " " , "" ) & BR() &
if(LEN(Contact__r.OtherCity)>0, Contact__r.OtherCity& ", " , "" )&
IF(LEN(Contact__r.OtherState)>0, Contact__r.OtherState& " " , "" )&
IF(LEN(Contact__r.OtherPostalCode)>0, Contact__r.OtherPostalCode,"") & BR() &
IF(LEN(Contact__r.OtherCountry) >0, Contact__r.OtherCountry,""),
NULL)

 
This was selected as the best answer
Ivan WinzerIvan Winzer
Thanks Parker,

Once i removed the (!) in the if statement it did just what i needed. Thanks so much...

Ivan
Parker EdelmannParker Edelmann
Great! I'm glad it worked. Thanks for selecting it as best answer,

Parker