Display Ordering of Stock Portfolio in Navigation Panel.

MMEX4Desktop, incl. Windows, macOS (10.10 or newer), and Most Unix variants using the GTK+ toolkit

Moderator: Renato

Wirmike
Super User
Posts: 85
Joined: Sat Oct 02, 2010 6:04 pm
Are you a spam bot?: No

Display Ordering of Stock Portfolio in Navigation Panel.

Post by Wirmike »

I have a stock portfolio that consists of 6 accounts.
The Provider’s (let’s say, ‘Utopia Futures Limited’) statements, list the portfolio in non-alphabetic order.
So as to present these accounts in the required order to assist reconciling with MMEX, I have amended the account names, prefixing each numerically 1-6, OLD01, OLD02.
Eg.,
Navigation Panel:
>Stock Portfolios
>Utopia Futures Limited
“1: First Account Name”
“2: Second Account Name”
..and so on.
The latter two (OLD01 and OLD02) are kept as a record of the of originals, now redefined/reissued by the Provider.

So,now I have the Provider’s Statements, the MMEX Stock Portfolio Panel and the MMEX ‘Share Accounts’ Navigation Panel all tidily ordered in agreement. Except, of course, for the ‘OLD101 and OLD02 that only appear in the MMEX record.
However, now coming to the crux:
the MMEX ‘Stock Portfolios’ Navigation Panel shows the account names out of sequence (from the top) : 4,1,2,3, OLD02, OLD01, 6, 5.

Crucially, the lack of the correct order in the Stock Portfolios Navigation Panel will not (as far as I can see) affect the integrity of the Portfolio data - it just appears to be a shame. Items appearing in order and falling in line with other listings, throughout MMEX, just quite simply looks good and doesn’t niggle.
A matter of presentation, pure and simple.
Consistency inspires confidence, ease and pleasure in use.

Not sure if this can be worth bothering about, or if there is something worth looking into - if only for the aesthetic!

I have tried to explain the “issue” w/out using screen-shots, which would give some personal information. Hope the explanation is understandable.

MMEX 1.6.4
MacOS 10.13.6

Ps. I am not sure if this Order Issue is because I have done something in error around the time Stocks and Shares were revamped when v.1.3.1 was released, or there is a quirk (bug) in the program.
Although not a critical issue, some thoughts or comments would be welcome.
nstein
Developer
Posts: 40
Joined: Tue Nov 29, 2022 10:31 pm
Are you a spam bot?: No

Re: Display Ordering of Stock Portfolio in Navigation Panel.

Post by nstein »

The default sort order for share accounts in the navigation panel is by STOCKID (an auto-generated table key the user can't control). It is trivial to switch the default sort to STOCKNAME, so I will do this for 1.7.0.

For 1.6.4 the only option is to use SQLite to renumber the STOCKIDs by alphabetical order. Something like this code should do the trick:

Code: Select all

CREATE TEMP TABLE STOCKS_TEMP AS SELECT STOCKNAME, STOCKID FROM STOCK_V1 ORDER BY STOCKNAME;
UPDATE STOCK_V1 SET STOCKID = (SELECT ROWID FROM STOCKS_TEMP WHERE STOCKS_TEMP.STOCKID = STOCK_V1.STOCKID);
UPDATE TRANSLINK_V1 SET LINKRECORDID = (SELECT ROWID FROM STOCKS_TEMP WHERE STOCKS_TEMP.STOCKID = LINKRECORDID) WHERE LINKTYPE = "Stock";
You could run that against a copy of your database and see if it gives you the result you are looking for, or just wait until 1.7.0 is released.
Wirmike
Super User
Posts: 85
Joined: Sat Oct 02, 2010 6:04 pm
Are you a spam bot?: No

Re: Display Ordering of Stock Portfolio in Navigation Panel.

Post by Wirmike »

@nstein,

That’s super news. I’ll wait for v.1.7.0

I see a pre-release notice for Android in “Announcements” and await the full release for iOS - one or two other goodies seem to be in the offing.

Cheers!