Jump to content

Text Block Limits error


This topic is 6439 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am searching a concatenated calculation and get an error "This operation could not be completed because you have reached text block limits." I searched for an 'a' in the search field which has 13,000 records. It finds on a calculated result *(global field)*. It was a test - I doubt anyone will search for that because the results would be too large, but 1) What does it mean and 2) Any way to stop that error and instead display something more friendly like 'please filter your search further?'

They enter into a global, so possibly I could check via my script that it contains more than one character like Length(field) > 3? How will I know where that ceiling is so I don't get the error? Ideas would be appreciated and so would an explanation of what it means.

Linda

Link to comment
Share on other sites

I don't think it's the length of your search criteria, that the error refers to. In FM 6 a text field could hold up to ~64000 Kilobytes, in FM7 the limit is now 2 Gigabytes per field.You reached somehow this limit with your search would be my guess

Link to comment
Share on other sites

Thank you Detlev, At first, I was afraid my calculation was too long but I don't get the error when I search for 3-4 characters; at least I haven't so far. I will try what you suggest and stop the error message but ... stopping an error from displaying doesn't stop the error, right? Does the error mean it won't display all of the found records? Shouldn't I address why it occurs also? Thank you for helping me. smile.gif

Link to comment
Share on other sites

I have search file with only global. User enters part to search. Script takes the search criteria, goes to Customers, finds *(searchtext)* in the calculation field, copies the IDs only (form layout with only id, copy all records), goes back to Search and pastes them into global key in the search file. The calculation searched in Customers is:

CustomerName & " " & Contact & " " & CustomerType & " " & Phone & " " & City & " " & State

The results of the search are displayed in a portal in the search file. Customers actually has 17,700 records if that matters. Portal displays 30 rows. I've just never seen this before. crazy.gif

Oh. Is it because there are too many Ids pasted back in the global? Is that the limit I'm hitting? The record ids are 5 digits long it appears. I use Status(CurrentRecordID).

Link to comment
Share on other sites

That error doesn't sound very "FileMaker" - I would suspect it might be related to trying to put such a large amount of text onto the clipboard (cut & paste).

If you use SetField instead, you probably wouldn't see the problem - but then, how do you do them all at once?

Link to comment
Share on other sites

Hmmm, it's deceptive - looks like FM error - FileMakerPro in upper corner with red x. I wish it would tell me more (like which program is generating it). Thanks for clarifying it isn't an FM error. The results are NO copy whatsoever - no results appear in the Customers portal but I also paste the found count in a global at the top of the Customers portal and it indicates that it found 16,700 of them. frown.gif

The other portal (prospects) on same layout (exact same process) works fine but it displays only 7430 records.

And I checked my script. I have Set Error Capture [On] at the beginning of the find script in Customers. I will try using Set Field - setting a global in Customers with a multline of the IDs (using a loop), then a set field of that field to Search global key and see if it solves the problem. Otherwise, I will need to determine how large of a block of text (how many records) can be maximum clipboard will work with ... and include in script - If[CurrentFoundCount) > (whatever), Show Message (include more in your search.) I will let you know if Set Field works. Thank you! smile.gif

Link to comment
Share on other sites

You have obviously nailed it ... when I write this identical found set to multiline global in Customers (16,700) and then use Set Field to set the global key in Search, it works fine. And the portal displays all 16,700 records.

I never knew the clipboard was so limited!! I tested this on my system at home and also the one here at work - both produced the identical error. I swear I've copied large graphics to clipboard without an error ...

Now I'm unsure whether to limit my searches or change the entire process. This is a temporary structure, transitioning between PeachTree, Act, FM6 and FM7, so I don't want to put a lot of work into it - but I want to totally understand it so it never happens again. BTW, this is not even networked - just lookup information on each system. smile.gif

Link to comment
Share on other sites

Good grief. crazy.gif Now I'm getting the error with only one resultant found record. Is the clipboard hanging onto all of this? How can I clear the clipboard?

I don't think I like using this process at all. I thought I was clever and I certainly am not. frown.gif

Link to comment
Share on other sites

Well, just as I posted, it crashed my system. I don't know if I have something wrong in my script which is causing this ... or whether the clipboard just can't handle this much information. Any ideas?

Yeah ... I think I know ... trash the cut & paste and go to Set Field!! smile.gif

L

Link to comment
Share on other sites

Right. I always shy away from cut&paste whenever possible. There are some (VERY limited) situations where it's unavoidable, but most of the time Set Field is better. If you have a rampant multi-tasker with several applications open who copies back & forth from the clipboard... you get the picture.

Jerry

Link to comment
Share on other sites

Jerry said ... " If you have a rampant multi-tasker with several applications open who copies back & forth from the clipboard"

Right. This isn't networked but several stand-alone files (and yes I know that sucks). I asked each user and they didn't care about their clipboards (I have ClipSave also). Two reasons I decided on copy/paste: 1) I thought it worked faster than Set Field (and this is two large portals displayed side-by-side matching one global to two other files both with large record counts), 2) This is an attempt to pull this information together for User correction and lookup before we transition this mess into 7 and 3) I thought it was easier because those layouts were already in place (yada yada). crazy.gif

But this 'time-saving' idea of mine has cost me 3 (soon to be 5) hours I couldn't afford. I still believe that, as The Shadow indicated, there possibly may be problems in my scripts - that the clipboard should have held it. Because of the copy/paste, I was jumping from Search to Prospects (copying) then back to Search (to paste) then to Customers (to copy) and back to Search to paste and my scripts are a bit, uh, messy and inefficient. And then I had to add if no records found and how that would affect the process (from both other files). I also noticed that if it didn't find matching records in the first file, it would produce this error in the second and ...

I will rewrite this process. It will take more time but it nonetheless is a valuable lesson ... type out the process (and scripts) before ever starting - otherwise you can get terribly lost in the layouts and files and get messed up. wink.gif

I just realized something else... I usually write a script start to finish and they have always made total sense to me. Because I was unsure of this process, I wrote several smaller scripts planning to chain them. But then I got mixed up on 'continuing' the chain of adding several Perform Script [Externals] in a row and which steps should be in which sub-script (or in-between in the main script). I prefer writing complete scripts and I certainly prefer 7 ...

Linda

Link to comment
Share on other sites

The Copy All Records and Paste technique is much faster than Set Field. But it's the only time I would recommend not using Set Field. I usually test the resultant found set by dividing 64000 by the number of characters in the id field plus 1 (for each carriage return). If the result is less than the found count, there are too many records to copy and a message informs the user to add criteria to his find. I don't recall what the limit is for text fields in 7, but it doesn't seem like you would be exceeding it.

What do your additional copy/pastes in the script do?

Link to comment
Share on other sites

Queue said ... "What do your additional copy/pastes in the script do? "

Scripts only do what I indicated above - file switch, copy, file switch back to Search, paste then repeats in another file, then finally a layout switch in Search to main view and refresh window. I re-wrote the scripts but kept the copy/paste because, as you indicate and I thought at first, the Set Field process takes longer. It works fine except when the found set is over 11,000 records in the second file. Hmmm, 11,424 x 6 (recordID + 1) = 68,544. tongue.gif

Here is the strange thing ... When I use Set Field (on the exact same found count) setting a global text field, I don't get the error but it only sets half the Ids

Link to comment
Share on other sites

Ah, I thought you were using 7. It makes sense then. You're exceeding the 64,000 character field limit. I would assume Set Field overwrites existing data once you reach the limit, though I haven't tested this.

I would add a test for Status(CurrentFoundCount) > 10660 and tell users to further limit their criteria. That's quite a large number of records to need to see all of them, don't you think?

Link to comment
Share on other sites

Thank you so much! I will add this test to the records, yes. And I apologize to the forum for not making my version clear. And that explains why The Shadow thought something else must be going on. So sorry - I was beyond tired and on deadlines. crazy.gif I am currently designing in both versions (for the same solution) and it is driving me nuts.

Ah, I will also keep in mind that Set Field does not produce an error when field limits are exceeded but paste will. An interesting learning experience, for sure. wink.gif Thank you everyone. smirk.gif

Link to comment
Share on other sites

This topic is 6439 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.