I have a phone number field in a report that is a jumble of numbers and/or spaces/ and or dashes, ("-" or " ". My formula to get rid of these characters was
if "-" in {EnrCommunicationInfo.CommValue} then Replace ({EnrCommunicationInfo.CommValue},"-" ,"" else
if " " in {EnrCommunicationInfo.CommValue} then Replace ({EnrCommunicationInfo.CommValue}," " ,"" else
{EnrCommunicationInfo.CommValue}
but I noticed that it only does one or the other of the operations. But I have a couple of records that have format XXX XXX-XXXX, so it only gets rid of one of them. How do I nest these statements so that it will take care of both of them? thanks in advance.
Brian
if "-" in {EnrCommunicationInfo.CommValue} then Replace ({EnrCommunicationInfo.CommValue},"-" ,"" else
if " " in {EnrCommunicationInfo.CommValue} then Replace ({EnrCommunicationInfo.CommValue}," " ,"" else
{EnrCommunicationInfo.CommValue}
but I noticed that it only does one or the other of the operations. But I have a couple of records that have format XXX XXX-XXXX, so it only gets rid of one of them. How do I nest these statements so that it will take care of both of them? thanks in advance.
Brian