View Full Version : Problems with splitting items
David_F
09-21-2020, 06:58 PM
I am having difficulties splitting items using Item > Split. I have checked the Help File but it is not very informative. Is this feature meant to be controlled by the Import settings in Options, i.e. you have to check "Split text on separator" and specify some separator text? Or is it just based on carriage returns? I have tried it both ways and neither has been successful.
I have an Item with a number of lines in it that I want to turn into separate items. When I do Item > Split nothing happens. Or rather the item that contains the lines I want to be made into separate items gets renamed to the first line, but no split takes place.
If I have specified separator text in Options (which appears under the Imports heading, so I don't know if this is relevant to the purpose), and with that separator included in the item I try Item > Split, I get this error message:
"Error loading items: Foreign key violation. ItemAttribute table references missing row in Item table". Then I have to press Undo several times to get out of this error as UR will not let me proceed otherwise.
I then tried copying the lines in question and using Paste Special to "Paste Text One Item Per Line" - but all this did was create just one item, its title taken from the first of the lines.
I am using version 6.1, downloaded today from https://kinook.com/Forum/showthread.php?t=5670, so I assume it includes the 6.1.01 fix that seems to have addressed various Item Splitting issues.
As far as I can tell from the brief mention in the Help File this should be a straightforward split based on carriage returns - "separate items for each line of text". However this is not working for me at all.
I finally (sort of) got what I was looking for by copying to the clipboard, then going to the Import dialogue, choosing Load Clipboard, and assigning the sole Input Field to Item Text. This is not exactly convenient however.
Also, is there meant to be an option to name/not name the split items based on the original text? I got the impression there was from earlier posts.
kinook
09-21-2020, 07:24 PM
Item | Split (and Item | Join) does use the separator text configured at Tools | Options | Import | Separator text for appending/joining/combining/splitting. If you want to split on new lines, enter one or two blank lines as the separator.
https://kinook.com/UltraRecall/Manual/option_importdialog.htm
When splitting, the item title is always based on the first line of text in the new item (truncated to MaxCharsForItemTitle at https://www.kinook.com/Forum/showthread.php?t=5097).
See IncludeItemTitleOnJoin at https://www.kinook.com/Forum/showthread.php?t=5097 for configuring whether to include the item title when joining.
You might try restarting UR or compacting & repairing your database if you're getting an error message like that.
David_F
09-22-2020, 03:13 PM
hi Kinook
thanks for the clarification. This is definitely a problem with one or more of my databases. All kinds of weird things happening when I try to carry out a split in them. Template folder vanishing. Compact and repair brings it back but now icons for templates have disappeared. Items turning read-only. And so forth.
When I create a new database and try splitting an item in that, it works fine.
From a documentation point of view, I would suggest something in the Item > Split entry that directs the user to the Import tab in Options. I understand how this function operates across the gamut of join/split/import, but I don't really associate splitting an item with importing, so I puzzled over this more than I needed to.
With the databases that seem to have become corrupted, I will copy and paste items from them into brand-new databases. I assume that would be a fresh start for them and shouldn't carry over any of their problems?
cheers
David F.
cnewtonne
09-22-2020, 07:42 PM
For my own edification, what could've potentially caused the database to be corrupted? I have UR databases that I started 11 years ago, but never ran into any corruption issues. Is there any particular activity you do that you suspect? For example, do you store files likes pdfs, MS Word, Excel, etc?
Thanks
David_F
09-23-2020, 12:11 PM
Well I would say I've had the same kind of experience, though not going back quite as far as 11 years - I mean with regard to the absolute stability and reliability of UR. I've never had this happen to any other database. So it is a bit of a mystery. It cropped up in the context of trying to split an item, and failing. Something did definitely go wrong there.
I do have databases where I store Word, Excel, PDF and so on, though not in this one. Never had any problems with them. Frankly there is no obvious culprit.
Several compact and repairs didn't fix it, including a reset to default settings. I tried copying and pasting items into a new database, but they just brought the problem with them. I'm not too worried. I'll probably export the items to CSV and reimport them somewhere else. It has not in any way put me off using UR.
David_F
09-23-2020, 05:07 PM
hi Kinook,
I have worked out what (for me anyway) causes the error I reported earlier in relation to splitting an item. I can reliably produce it if in a database I try to split an item, and the options I have set under Import do not correspond with what I am doing.
E.g. if I try to split an item but the "Split text on separator" box is unchecked, I get the error message as previously noted: "ItemAttribute table references missing row" etc. Or if the box is checked, but the item does not contain separators corresponding to what is in the separator box in Options, I get the error message. At this point if you Undo enough you come out of the error message; but I suspect if you keep trying to use the Split command when things don't match up as described above, you can end up as I did with other problems: missing template folder etc.
So now I know how to avoid the error happening - but it doesn't seem a very "forgiving" way of doing things...
cheers
David F.
kinook
09-23-2020, 11:04 PM
I wasn't able to reproduce that behavior. Can you ZIP and post or send a database that can demonstrate the issue? Thanks.
David_F
09-24-2020, 06:12 AM
Will do... but just out of curiosity, on your system, if you try to split an item, and it can't be split (separators aren't present, "split"option isn't checked), what happens? Does it just fail silently?
cnewtonne
09-24-2020, 08:34 AM
I'm able to reproduce an error that seems to be related to undoing a split operation if the split parent is first child of a root item.
https://www.kinook.com/Forum/showthread.php?p=22345#post22345
cnewtonne
09-24-2020, 08:43 AM
I'm able to reproduce the 'error pasting data: foreign key ...'
1. Download the urd file from https://www.dropbox.com/s/bponofyugf8pz74/error-pasting-data.urd?dl=0
2. Verify option / 'split text on separator is checked'
3. Verify options / text separator value is null
4. Go to info item 'Testing split errors' & drag its contents to tree root 'My Data'
5. Should get the error
Thanks
David_F
09-24-2020, 03:38 PM
hi cnewtonne,
haven't been able to download the db, but that is the same error message I get. What is meant to happen when you do this? If I drag some text over to my Home icon, whether this text has separator text within it or not, I just get an item created under Home with that text in it.
David
kinook
09-24-2020, 07:36 PM
Will do... but just out of curiosity, on your system, if you try to split an item, and it can't be split (separators aren't present, "split"option isn't checked), what happens? Does it just fail silently?
The Split text on separator does not apply to the Item | Split command. It applies when importing or pasting text into UR -- the Separator text will be used to create multiple items, splitting the imported text on the separator.
If the separator text is not found when splitting, it creates a single item. Although I did find that if Separator text is empty, UR will hang when splitting an item (or importing text with Split text on separator checked). We'll fix that.
kinook
09-24-2020, 10:27 PM
The latest download (6.1.0.2) fixes the following issues:
1) Hang when splitting or importing item and Tools | Options | Import | Separator text is blank
2) Error undoing after splitting or importing item at root of tree
3) Updated the help to document the import options applying to Split and Join commands
4) Dropping text not honoring Split text on separator import option
David_F
09-25-2020, 04:58 PM
Sorry Kinook, I don't want to drag this out, and I appreciate the work you've done, but I still have a problem with this new version.
My basic case is an item containing the lines:
item 1
item 2
item 3
I want to use Item > Split to turn this into three items. In Options > Import, in Separator Text I put two carriage returns. I understand now that the "Split Text on Separator" option isn't relevant for this operation so I just leave that unchecked.
When I now do Item > Split, I get the same error message as before. However, if I press ctrl-Z a few times, I get to a point where there are the three items, as originally intended.
So I can get to the objective, but it's an awkward way to do it and it makes me a bit wary of using the feature.
kinook
09-25-2020, 05:30 PM
Does that occur in a new database?
David_F
09-25-2020, 06:42 PM
Yes. My regular routine for testing this is to make a new database to try things out. However it also happens in existing databases.
kinook
09-25-2020, 06:55 PM
Can you provide detailed steps on reproducing the problem?
https://www.kinook.com/Forum/showthread.php?t=3038
kinook
10-11-2020, 04:35 PM
This problem was occurring if there were unsaved changes to the current item when splitting. Fixed in the latest download (6.1.0.4).
David_F
10-11-2020, 05:11 PM
Can confirm this works perfectly now. Thanks Kinook!
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.