hartmut77 Posted December 15, 2003 Posted December 15, 2003 Hello I have a situation where I scanned a great deal of ocr files which were inaccurate and had to be corrected extensively in a word processor. It comes down to this. If I can drag text blocks into a field in filemaker I can execute scripts that will separate and move text to the right fields. The catch is that it is different when there are more than three paragraphs in the text block. If it is just the three lines then I have a script which takes the first line and puts it in a field and the second line in a field and the third line in a third field. BUT When there is more than 3 lines (4 Lines) I need to do the same thing except the 4th line needs to go to the field where the 3rd line went and the third line needs to be disregarded but a new record has to be made but the 4th line goes in the field and the third is ignored. I will give an example text block dragged into filemaker field called " textblock" "V6 Chevy Cars" "W.B 100.6 " "2D Sedan G554H" "V6 Chevy Cars" goes into field "CAR" , "W.B 100.6 " goes into field "WHEEL" and "2D Sedan G554H" goes into Field "MODEL" BUT the problem is that some text blocks contain more than 3 lines like "V6 Chevy Cars" "W.B 100.6 " "2D Sedan G554H" "4D Sedan G564H" In which case a new record is created with the same information in "CAR" , "WHEEL" But "2D Sedan G554H" is ignored this time because it is in the previous record and "4D Sedan G564H" takes its place in the new record. Most are three lines but there are some as many as 10 lines so I have to solve this problem. I know this is complicated but I have thousands of these to do. So any help will be massively appreciated Thanks Dave
dbruggmann Posted December 15, 2003 Posted December 15, 2003 You can use nested If statements in your script: If ["PatternCount (YourField, "
John Caballero Posted December 15, 2003 Posted December 15, 2003 You could use PatternCount(yourField, "
hartmut77 Posted December 16, 2003 Author Posted December 16, 2003 Thanks for the answers. I will have to work on this a while to see which way works the best. They are valuable insights and I thank you. Dave
hartmut77 Posted December 16, 2003 Author Posted December 16, 2003 Hello Again I tried it and the patternCount thing works but I tried to implement what Detlev said and I can't seem to get it. How do I make a Case statement that deletes the third line , making the present 4th line the third line after deletion? Still Stuck a little. Dave
dbruggmann Posted December 16, 2003 Posted December 16, 2003 Hi Dave You can accomplish your task by using calculation fields only. Following the formulas for the calculation fields you need for textblocks with three and four lines (see also attached sample). The points [...] you can ignore, i use them just for more readability of the calculations (and ==> are followed by comments). StripLine.zip
Recommended Posts
This topic is 7718 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