Cousin Jack Posted December 9, 2003 Posted December 9, 2003 I am getting to the end of a long process of writing a solution and have an annoying (but no doubt simple) bug that I just can't resolve. The problem is that when copying and pasting text (from and to my policy text field) between files, I keep getting an unwanted string of numbers that I believe represent the field contents from some time ago when I had the field formatted as a repeating field. It does not appear to be current data nor does it appear to be obviously still in the database. I have typed up a string of events in the hope that someone can see what is going on. Go to FILE 1 Select text with mouse Copy Go to FILE 2 click in empty field paste ..........WRONG DATA (the string of numbers) Cut Go to FILE 1 Select text with mouse Copy Go to FILE 2 paste .........Expected data (text from File 1) Go to fILE 1 paste ...........WRONG DATA! (string of numbers)! Select all delete (backspace) Go to FILE 2 Select the current contents Paste over the top to replace ...........expected data (the string of numbers) select string of numbers cut Go to new text data in another record of FILE 2 Select new taxt data Copy Go to FILE 1 paste ...............expected data (Text ) cut Go to FILE 2 Paste ...............WRONG DATA (string of numbers) Go to FILE 1 paste ...............expected data (String of numbers) Go to FILE 2 select new text data from another record Copy Go to File 1 select field with wrong data paste over the top to repalce ................expected data (Text) cut Go to FILE 2 select string of numbers paste over the top to replace ...............WRONG DATA (String of numbers) If anyone can help I would be really grateful. Many thanks Jon Creber (CJ)
Cousin Jack Posted December 9, 2003 Author Posted December 9, 2003 Thanks for looking at this for me Detlev, with regards to 1 and 2, no this is not scripted. the problem occurs when I cut copy or paste manually from one file to the other. The string of events that I describe is just an example of what happens, i.e I cut pasted and copied in various order in the hope that a pattern could be seen by someone with a better eye for such things. I will look into your idea number 3 but I have already searched carefully to see whether there is an unwanted field somewhere that is being picked up. - I cant see one anywhere.
dbruggmann Posted December 9, 2003 Posted December 9, 2003 Another thought: Maybe the confusion is with the defining of the fields. Are all your fields, from which you copy or to which you paste something else then numbers defined as text fields?
Cousin Jack Posted December 9, 2003 Author Posted December 9, 2003 Hello again Detlev, Both fields are indexed text fields. In fact one file is a renamed copy of the other(one is used for Residential Home Policies and the other for nursing home policies). The problem field contains the text of the policies. Jon.
Cousin Jack Posted December 9, 2003 Author Posted December 9, 2003 Some further information: The string of numbers are ALL of my policy numbers - i.e the contents of the "Policy Number" field in every record in the file is being pasted into the one "Policy Text" text field.
Charles Delfs Posted December 9, 2003 Posted December 9, 2003 you said: >>> The string of numbers are ALL of my policy numbers - i.e the contents of the "Policy Number" field in every record in the file is being pasted into the one "Policy Text" text field. <<< Soundz like yer using a global field Charles
Cousin Jack Posted December 9, 2003 Author Posted December 9, 2003 If ownlee I waz, Charles, If ownlee I waz. Type: Text Options: Indexed (for all fields cut and copied from and pasted to.) Fair comment though. Jon.
kenneth2k1 Posted December 9, 2003 Posted December 9, 2003 Just a suggestion, it might be easier and more reliable if you use a relationship and display the related info, instead of copy/paste from one file to another. Could you use the Get Repitition function? But then again, I don't know your setup and if it would even help. Ken
Cousin Jack Posted December 9, 2003 Author Posted December 9, 2003 Hi Ken, Thanks for comming in on this one, and to Detlev & Charles. I do indeed have relationships working very extensively in this solution. Indeed, my need to allow users to cut and paste is because the sloution will let them customise a new record in one data while viewing and taking bits from another existing one which they will be viewing side by side on the same page. Your comment on relationships, has prompted me to I have trawled through all my relationships again and I think that I might have stumbled across the problem............ In order to prevent users getting into trouble with unexpected scrolling etc, when they move from a list of policies to a single policy, I have done an omit record, find omitted to leave them with just the one policy. In order to return to the original found set, I have done a "return to found set" script that uses the same to same relationship gholdfound set : Policy number As it is the list of all my policy numbers that are being pasted unexpectedly, is it possible that this may be my problem, and if so, is it possible for me to retain my hold found set system but still allow cutting / copying and pasting? If any of you has the time to take a look at a copy of my files, You might see the problem - I have become totally dazed! I think I would need to send them to you via normal e-mail rather than as an attachment to this thread.
Cousin Jack Posted December 10, 2003 Author Posted December 10, 2003 I have just run my hold found set and created a new record to do my pasting into and hey presto - the numbers pasted ARE the HELD POLICY NMBERS !!! so - my problem is as above ...... how can I maintain my system of holding my previous find without loosing my ability to cut and paste? Thanks for all you help so far chaps, can hang in on the home straight please !
CobaltSky Posted December 10, 2003 Posted December 10, 2003 Hi Jon, Sounds like you now know what the nature of the problem is, and are looking for options with which to solve it. There are a couple of ways to force scripted copy/paste rountines such as your 'hold found set' setup to operate in a 'clipboard friendly' way. One of them - and to my mind the best, is the shareware plug-in from Troi Automatisering called 'ClipSave' which provides functions with which to efficiently save and then restore the contents of the clipboard within a script. The URL for more information is: http://www.troi.com/software/clipplugin.html The ClipSave plug-in is tailor-made for situations such as the one you've described. However if you'd prefer to 'roll your own' solution, it's possible to simulate something comparable by setting up a special clipboard layout with two global fields (one text and the other a container) and scripting a process which empties both the global fields, attempts to paste into the container first, checks for an error and if an error occurs, pastes into the text field instead (all data types other than container can be temporarily stored in a text field). You'd then require a counterpart process to restore the clipboard - which can be done by going to the clipboard management layout, testing to see if one of the global fields is empty and if it is not, copying it, and if it is, copying the other one. This works best of you create two separate scripts to 'save clipboard contents' and 'restore clipboard contents' and then call them as sub-scripts at appropriate points from within your existing scripts. It's a lot of mucking around and some extra overheads in your files and scripts, but if you'd prefer to side-step the plug-in option, it does provide another alternative.
murray Posted December 10, 2003 Posted December 10, 2003 Hi Jon, I may be a bit off target with this but I just found a problem with copy and paste in Windows after creating a file in Macintosh. I changed to the "Insert Calculated Result" script step and this solved my problem. Good luck, Murray
Cousin Jack Posted December 10, 2003 Author Posted December 10, 2003 Thanks very much Murray, I'll have a look at this. Thanks for coming in Ray. I have emailed you a copy of two significant files with an explanation. I Will certainly follow up the Troi lead but I would be grateful if you could just have a quick look to see whether I am really on the right track with what I think is causing this, or whether I'm kidding myself!
Cousin Jack Posted December 14, 2003 Author Posted December 14, 2003 Ray ("Cobalt Sky") at nightwing.com, I have purchased the developer license for the Troi.com "ClipSave" plug-in you recommended. This has completely solved the problem. It allows me to do just what I had intended - i.e. create a subset of records, go to one found record from the subset, go from there to any other record or subset via an ordinary search, altering the text in records and messing with the clipboard to my hearts content. ............ Then after all this, to return to my original subset. Absolutely brilliant! Once again Sincere thanks to Ray for finding a solution, and also to Detlev, Charles, Ken and Murray, for guiding me towards the root cause of the copy and paste problems. Regards, Jon.
Recommended Posts
This topic is 7649 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