harrrrrrry Posted February 3, 2004 Posted February 3, 2004 I have a field with two lines of text in ie Red Cars Yellow Cars How can I remove just the second line of text (Yellow Cars) and put it into a different field still leaving the first line of text (red cars) in the original field. Thanks
SassyTexan Posted February 3, 2004 Posted February 3, 2004 I am assuming that it is a repeating field? If so create a clone of your existing database and import your current records. During the import after you match the fields and click next at the dialog click splitting them into separate records. Then continue. Each repeat in the repeating fields will now be its own record line.
harrrrrrry Posted February 3, 2004 Author Posted February 3, 2004 Thanks Sassy one problem the "splitting fields" part does not highlight and I don't quite know what you mean by a repeating field. Thanks
harrrrrrry Posted February 3, 2004 Author Posted February 3, 2004 Maybe it is not a repeating field. The filed I want to split has different values in for each record for example Record 1 has in the field Red Cars Yellow Cars Record 2 has in the same field Green Trucks Orange Trucks
Salesman0Gil Posted February 3, 2004 Posted February 3, 2004 If you do not know what repeating fileds are, then I am guessing that the info is not in repeating field. One question, is the first line of info the same size all the time? or even the same amount of words? and the same question for the second line?
harrrrrrry Posted February 3, 2004 Author Posted February 3, 2004 Not the same amount of letters or words each time I am afraid
Lee Smith Posted February 3, 2004 Posted February 3, 2004 To parse out the first line of your text field, you will need a calculation field with the result of text. c_A_Text_Field = Calculation, Text Resutl Middle(A_Text_Field, Position(A_Text_Field, 1, 0, 1) + Length(1), (Position(A_Text_Field, "
harrrrrrry Posted February 3, 2004 Author Posted February 3, 2004 Thanks Lee that works but strangely the result removes the last letter of the text it pulls out. Could you give me the formula for pulling out the second line as well please. Thankyou you are a filemaker genius!! This will hopefully save hours and hours of cutting and pasting!!
Lee Smith Posted February 3, 2004 Posted February 3, 2004 Hi harry, Oops, I had copied this from another solution, you need to remove the -1 from the last part of the calculation. Middle(A_Text_Field, Position(A_Text_Field, 1, 0, 1) + Length(1), (Position(A_Text_Field, "
Lee Smith Posted February 3, 2004 Posted February 3, 2004 For the second line, try this. Trim(Middle( "
prissypan Posted February 4, 2004 Posted February 4, 2004 Hi guys, I have a similar problem, i have this chunk of information below in which i have to retrieve the value of the 'Drive Model Number' & 'Drive Serial Number' and split them into their respective field textboxes. Is it possible that i skip the first line and go to the 3rd line of the passage below? Any help is greatly appreciated! Thanx! Primary Controller - Master drive > > Drive Model Number________________: QUANTUM FIREBALLlct10 10 > Drive Serial Number_______________: 872008050170
harrrrrrry Posted February 4, 2004 Author Posted February 4, 2004 Thankyou once again Lee it all works perfectly now. Harry. And thanks to everyone else who tried to help.
Lee Smith Posted February 4, 2004 Posted February 4, 2004 Hi Harry, These seem to work, but it will depend on the structure of the text in reality. c_DriveModel, calculation, Text Result Trim(Middle(DriveFieldText, Position(DriveFieldText, "Drive Model Number________________: ", 0, 1) + Length("Drive Model Number________________: "), (Position(DriveFieldText, "Drive Serial Number", 0, 1) - (Position(DriveFieldText, "Drive Model Number________________: ", 0, 1) + Length("Drive Model Number________________: ")) - 1 ))) c_DriveSerialNum, calculation Text Result Trim(Case(PatternCount(DriveFieldText, ":") = 2, Right(DriveFieldText, Length(DriveFieldText) - Position(DriveFieldText, ":", 1, 2)), PatternCount(DriveFieldText, ":") >2, Middle(DriveFieldText, Position(DriveFieldText, ":", 1, 2) + 1, Position(DriveFieldText, ":", 1, 3) - (Position(DriveFieldText, ":", 1, 2) + 1)))) [color:"blue"] Change the field "DriveFieldText" in these calculations to the name of your field. HTH Lee p. s. These are pretty ugly, hopfully some one with more abilities than me will streamline them. :
Recommended Posts
This topic is 7667 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