[Solved] Sort function not available

Discuss the word processor
Post Reply
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

[Solved] Sort function not available

Post by Student_Charlie_23 »

Hello,

I need quick help. I am trying to use the "sort ascending" function but it is greyed out.
I have already unchecked the record function in the edit menu and I am also sure that I am not using the "read-only mode".

What else can I do?! I tried starting a new text but the function is blocked there aswell!

Please I need help quickly :(

Thanks in advance

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply [robleyd, Moderator]. Was Need Help quickly please!! :(
Last edited by Student_Charlie_23 on Tue Apr 07, 2020 4:40 pm, edited 1 time in total.
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Need Help quickly please!! :(

Post by RoryOF »

Try the attached file. Select the text, then /Tools /Sort
Attachments
sort.odt
(8.51 KiB) Downloaded 165 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

What are you trying to sort? Have you selected something that can be sorted?
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
robleyd
Moderator
Posts: 5079
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Sort function not available

Post by robleyd »

Have you first selected the paragraphs or table rows that you wish to sort? Until there is a selection made, the Sort option is not applicable.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Sort ascending function greyed out?!

Post by Hagar Delest »

Can you upload a sample file that shows the problem (see: How to attach a document here)?
Maybe there is one single paragraph with line returns.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

Yes. I have indeed selected what I was trying to sort.
I am trying to sort multiple pages of authors and their work.
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

Are you trying to sort data across Sections? Do you have Page Breaks inserted?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

We still don't know what you are selecting. You could have individual paragraphs, table rows or lines in one paragraph as described by robleyd and Hagar. Paragraphs and table rows can be sorted. Pages and lines in a single paragraph can not be sorted.
AOO 4.1.14 on Ubuntu MATE 22.04
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

Literature.odt
File sample
(18.89 KiB) Downloaded 127 times
The file basically looks like this. (See file sample)
Are you trying to sort data across Sections? Do you have Page Breaks inserted?

Well there are multiple pages of things I need to sort. And yes page breaks are on I think.
Open Office 4.1.3 on Windows 10
User avatar
robleyd
Moderator
Posts: 5079
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Sort function not available

Post by robleyd »

So, in that file, what is it you are wanting to sort? Please describe precisely what you are trying to do so we don't have to guess.

If you are wanting to sort titles and keep the associated data with the sorted titles, then Writer's sort is not the tool you want. You might be able to achieve that by changing the structure of your document.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

I just want to sort all the paragraphs by author.
The highlighted parts are the name of the authors. So I want to sort their names from A to Z and keep their information from the paragraphs together with the name.
I was told I could archieve that by using the sort ascending function. As you can see it is greyed out though.
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

Your sample file sorts for me, but as robleyd suggests, it sorts the texts intermingled with the headings - i.e., detached from their heading.
You may need to restructure your document.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

robleyd wrote:So, in that file, what is it you are wanting to sort? Please describe precisely what you are trying to do so we don't have to guess.

If you are wanting to sort titles and keep the associated data with the sorted titles, then Writer's sort is not the tool you want. You might be able to achieve that by changing the structure of your document.
That sums up my thoughts exactly. While Tools > Sort isn't grayed out when I select at least one character, I don't see how Tools > Sort could be used to sort the data in any useful way.
AOO 4.1.14 on Ubuntu MATE 22.04
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

That only happens if you use the sort function from the menu though. I could archieve sorting it by paragraphs by using the sort ascending function before.
Why is it greyed out now?

I can't restructure the document. I have restrictions about how to structure it and this is the only way. There must be a way to sort these as intended by the sort ascending function.
Open Office 4.1.3 on Windows 10
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

Student_Charlie_23 wrote:I just want to sort all the paragraphs by author.
The highlighted parts are the name of the authors. So I want to sort their names from A to Z and keep their information from the paragraphs together with the name.
I was told I could archieve that by using the sort ascending function. As you can see it is greyed out though.
It isn't grayed out for me when I select a single character. However, it won't do what you want to do with the way the document is organized. Insert a table with one row for each author, then drag each author and the author's data into a table row. You can then use Tools > Sort to sort the table rows.
AOO 4.1.14 on Ubuntu MATE 22.04
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

Is there really not way to just sort paragraphs by their first letter?! That seems like something very simple to do? How is this not an option?
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

I think you are wasting your time trying to use the Sort function in the manner you are trying. The data should be in a database, where each author's name (your Bold text) can be associated with his work (your normal text).

If each paragraph mark after the bold text is replaced with a line break (shift Enter} then the works data attaches to the Author's information and the data will sort correctly. Then the line breaks will need to be replaced with paragraph marks and the inter-record spacing adjusted, as all the empty paragraphs will have sorted to the top. Consistent use of Styles would have helped.

I haven't yet worked out how to do the Bold paragraph marker -> line break substitution, nor the reverse line break-> paragraph marker substitution.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

Student_Charlie_23 wrote:Is there really not way to just sort paragraphs by their first letter?! That seems like something very simple to do? How is this not an option?
Yes, you can sort pargraphs by their first letter, but that sorts every paragraph while you want to sort three paragraphs as a group. I don't know how to do that without putting the three paragraphs in a table row and sorting the rows.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Zizi64
Volunteer
Posts: 11358
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Sort function not available

Post by Zizi64 »

Is there really not way to just sort paragraphs by their first letter?!
Of course there is, and it works.
But it will sort your every PARAGRAPHS: the bold ones and the non bold ones too: the original structure will be garbled.
Last edited by Zizi64 on Tue Apr 07, 2020 12:34 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

Alright. Thanks for the help guys.
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

If one uses AltSearch, this might be possible
https://extensions.openoffice.org/en/pr ... -altsearch

Do this on a COPY of your main file.

Using AltSearch
Find [:::CharWeight::]$ <note 3 ":" before, 2 ":" after>
Replace \n
Regular Expressions to be checked
Press Replace All

exit AltSearch
Select All (Ctrl A)
/Tools /Sort <options as you wish>

then AltSearch again
Find \n
Replace \p
Regular expressions to be checked
Replace All
 Edit: Before each AltSearch use, ensure your cursor is at top of file, just in case! 
All the blank paragraphs will be sorted to the top, but your data should now be in correct order. You will have to do some manual reformatting - had you used Styles, this would be simple.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Sort function not available

Post by Bill »

RoryOF wrote:If each paragraph mark after the bold text is replaced with a line break (shift Enter} then the works data attaches to the Author's information and the data will sort correctly. Then the line breaks will need to be replaced with paragraph marks and the inter-record spacing adjusted, as all the empty paragraphs will have sorted to the top. Consistent use of Styles would have helped.
This could work, but the line with the author's name becomes stretched out because of the Justified alignment. Inserting a tab stop near the end of the line and inserting a tab before the line break should keep the text on that line aligned to the left.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

Here is your file, sorted as per my instructions above.
Attachments
Literature_sorted.odt
(13.21 KiB) Downloaded 119 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

Having done all that, one can use Find and Replace as follows
Press More Options
Click cursor in Find box
Press Format button bottom right
Select Bold
Find All
Press Ctrl 1 <to apply Heading 1 style>
Press Close.

Now Press F11 to open Styles and Formatting.
Press 1st icon from left (actually selected by default)
Right click on Heading 1, select Modify from the popup
select the Indents and Spacing tab, and enter a suitable "Space Above Paragraph".
Press OK.

This should start to space your data as you require.

Note that, for Future Find and Replace operations, you will need (1st time) to go through the above operations and press the "No Format" button to clear the formatting requirement.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Student_Charlie_23
Posts: 9
Joined: Tue Apr 07, 2020 11:09 am

Re: Sort function not available

Post by Student_Charlie_23 »

Thanks RoryOF :)

That helped me figure it out.
Open Office 4.1.3 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Sort function not available

Post by RoryOF »

You may find it helpful to read
Writer for students (several languages)

if not for this project, at least for your next one.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Solved] Sort function not available

Post by jrkrideau »

It looks like you are assembling a bibliography or reference list. If so, doing it manually is not likely the best approach, especially if you do this often.

It may be much easier to use dedicated bibliographic software. See Citation Manager Comparison Chart for three of the most popular. I have been using Zotero for years with great success.

I don't recognize the biblio style but Zotero, and I believe the others, have templates for literally thousands of journals

Any of these also allows you to download a complete citation from many university libraries and even Amazon with one mouse click.
LibreOffice 7.3.7. 2; Ubuntu 22.04
Post Reply