Matt Leach Posted November 9, 2009 Posted November 9, 2009 I currently have a phone number field in my database which is in the standard phone number format = xxx-xxx-xxxx I have a script that will copy the data in the phone number field into a PID field which works, but i was wondering how i could script this to remove the hyphens. So for example the phone number field would read 123-456-7891. Once copied, it should read 1234567891. Thanks
Lee Smith Posted November 9, 2009 Posted November 9, 2009 (edited) Filter (yourField; "0123456789") You can also use the substitute function Substitute (yourField; "-"; "") Edited November 9, 2009 by Guest added Substitute
Matt Leach Posted November 9, 2009 Author Posted November 9, 2009 Would that be a calculation set on the field or included in my script to copy the data from the field?
Matt Leach Posted November 9, 2009 Author Posted November 9, 2009 Thank you for your response, after looking at the substitue line you added, it now makes sense and ive added to my scrit as setting the PID field as: Substitute ( $PID ;"-" ; "" ) Works great, Thanks again!
Lee Smith Posted November 9, 2009 Posted November 9, 2009 Either one can be used in a script. Set Field [Field2; Filter (Field1 ; 123456789 ) ]
Recommended Posts
This topic is 5886 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now