Filtering on results of XPySort in Calc

Hello,

I use XPySort to sort a sheet automatically for my user. A link to XPySort is available in the last post in this thread. It has worked flawlessly for me since @mikekaganski patched it to work with Python 3, and hence LibreOffice, in June 2019.

I run LO in the Windows 10 environment. My user needs to filter the results of XPySort on values of a particular column. Until recently, such filtering has been no problem.

I recently switched to version 7.3.4.2 (x64) of LO and now the results of XPySort can’t be filtered. For example, if I add an AutoFilter to the appropriate column, then attempt to filter, I see all of the values in that column; i.e., the filter recognizes the data in the column to be filtered. However, when I select the value I’d like to filter on, the filter returns no rows. Indeed, regardless of which value I choose from the AutoFilter, I get no rows back. Then, if I choose “All” values, I get all the rows back. Interestingly, perhaps, I’m able to “hide” rows in the result of XPySort.

XPySort is an array function, so I thought maybe there had been a change in LO that prohibited filtering on the results of an array formula. But then I constructed a simple array formula and demonstrated to myself that that was not the case. LO was perfectly happy to allow me to filter on one of the columns of the result of an array formula.

Can XPySort be “fixed” so that I can filter on resulting array? I understand that XPySort is old and might be obsolete, and I might need to abandon its use. That would be a shame, but in that case, I would appreciate any suggestions that would help satisfy my user’s requirement.

Thanks for any help.

It would be nice if you attached a sample document: I don’t feel like creating some imagined data set, and some formula using the extension, just to learn later than it’s not the data set that causes the error :wink:

Of course. I was actually afraid someone might come along and dismiss my question out-of-hand because the extension is so old! :grinning: Thanks for helping.

I’ve included a workbook with three included sheets, unsorted data, sorted data, and field specs for the XPySort. If you try to filter on any of the sorted data columns, you’ll get no rows back.

For fun, I downloaded a old version of LO (6.4.7.2) and confirmed that I could filter on the sorted data successfully. Something happened between that version and the one I’m currently using.

Thanks again for your help.
AskLibreOffice.ods (38.6 KB)

With me (LO7.0.4.2) no problem with Autofilter|Standardfilter on your py_sorted Data

Thanks for the feedback. 7.3.4.2 doesn’t work with the standard or auto filter.

tdf#152334

Thank you for filing a bug report. It looks like the work around for me is to roll back to any version before 7.3.0.0. I just tested the last release before 7.3.0.0 (7.2.7.2) and found it supported filtering correctly. I will assist my user in rolling back to that version.

I will await a release that fixes the bug in versions 7.3.0.0 and later.

Thanks again for your help.