Newbies willowroad Posted July 26, 2004 Newbies Posted July 26, 2004 I have a field that contains text like 1.11/1.55, 1.66/.66, .66/.22, etc.. I need to put everything after the "/" in another field. Is there a way to do that? It's in a FM4.x db but I could put it in FM5.x if necessary. Thanks
-Queue- Posted July 26, 2004 Posted July 26, 2004 Set Error Capture [On] Loop Set Field [ newfield, Right( textfield, Length(textfield) - Position( textfield, "/", 1, 1 ) ] If [status(CurrentError)] {what you want to happen if the record is in use} End If Go to Record/Request/Page [Exit after last, Next] End Loop I believe the script steps and function commands should be the same in 4.
Newbies willowroad Posted July 26, 2004 Author Newbies Posted July 26, 2004 Thanks. I'll try it tonight.
-Queue- Posted July 26, 2004 Posted July 26, 2004 I should add an Else to the If step Else Set Field [ textfield, Left( textfield, Position( textfield, "/", 1, 1 ) - 1 ) ] End If This will remove the / and following text from the original field, if the first Set Field was successful.
Philland Posted July 26, 2004 Posted July 26, 2004 Haven't been in FM4 in a very long time, but in 5 or 6 it should be something like this: Right(FieldName, Length(FieldName) - Position(FieldName, "/", 1, 1)) Phil
Recommended Posts
This topic is 7494 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