Pick one or Multiple adds in random order

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Pick one or Multiple adds in random order

Post by BLOMASKY »

When entering a Purchase Order, I have a pick list of Items to Add. If I select 2 or more then click Continue, it will RANDOMLY add them to the purchase order. It ignores the sort order. This is important since the order of the items on the PO is important. Is this a bug or an "undocumented" feature?

Thanks

Bruce
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Pick one or Multiple adds in random order

Post by Jaymer »

I discovered this about a year and a half ago.
For me, it was not random, it was in exact reverse order.
I had to loop through the picked set, and write them to a temp file. Them run through that in my specified order to get them into the new file in the correct order.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Pick one or Multiple adds in random order

Post by BLOMASKY »

humm, Wonder if our FAVORITE Software developer can change this?

Are you listening Vlad????

Bruce
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Pick one or Multiple adds in random order

Post by aware_support »

Not sure I understand. If items are added somewhere and then shown by a query which has a specific order, then this order must be respected for all added items. The query just needs to be refreshed.
Aware IM Support Team
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Pick one or Multiple adds in random order

Post by BLOMASKY »

I have a pick list that allows multiple items to be selected
Next step in process is CREATE OrderLines for EACH ....

One of the attributes in the OrderLines BO is the LINE NUMBER which is incremented and used to sort and display the table. I have the pick list sorted "the correct" way. So when the user selects multiple records, they are NOT added in the order that I displayed them in the pick list. This is the problem.

Does this make sense?

Bruce
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Pick one or Multiple adds in random order

Post by aware_support »

You cannot rely on the system to maintain this order. Your line item must have an attribute that sorts them accordingly - in the order they were originally displayed before the user picks them. The value of this attribute must be maintained.
Aware IM Support Team
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Pick one or Multiple adds in random order

Post by BLOMASKY »

I don't get it Vlad,

The pick list is sorted Alphabetically, I don't want to create an attribute for the sort order! (Think what I would have to do when a new item is added, renumber all of the items after it??)

Why can't you process the records in the same order that they are displayed in the pick list? The users see them in A, B, C. order and want to add them in the same order.

Bruce
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Pick one or Multiple adds in random order

Post by aware_support »

It's not easy - you could have a selection across multiple pages. If your original items are sorted alphabetically why don't you sort them alphabetically in whatever object you are adding them to? I don't understand what your line number is supposed to mean...
Aware IM Support Team
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Pick one or Multiple adds in random order

Post by BLOMASKY »

The Line # is used to keep things grouped together. The user will want to order Item A1 and B1 and have them added to the purchase order, then, to the same purchase order, add items A2, A3, B1, B3 and have them next to each other (since they are grouped together, so the PO looks like
1) Flooring Model A
2) Grout to Match Flooring Model A
3) Panel Model A2
4) Studs for Panel
5) Nails for Panel.

etc. etc.

There are many cases where the order of the list has to be determined by the user, but I don't want to restrict him from picking more than one.

My question is, since you have the query, you have to loop through it somehow, to add the items that are selected on the pick list, why can't you loop in the same order as they are displayed? According to Jaymer (who is much smarter and better looking than me!), it seems like you do this in REVERSE order. If that is true, how hard is it to change the order?

Bruce
UnionSystems
Posts: 197
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

Re: Pick one or Multiple adds in random order

Post by UnionSystems »

The other place we've observed where order of items in not maintained is the Multi-Selector widget
Attachments
Multi Selector Widget Example
Multi Selector Widget Example
Screen Shot 2019-03-27 at 9.38.53 am.png (15.91 KiB) Viewed 11863 times
AWS Linux, Windows Server, AIM 8.4 & 8.6
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Pick one or Multiple adds in random order

Post by aware_support »

Code: Select all

If that is true, how hard is it to change the order?
It's not true. The order is determined by the order in which the user selected the records.
Like I said, it's not easy to change. Selection is performed on the client and the client doesn't know the sorting order of the query (sorting is done by the server). All that the client has is ID's of the selected records (which can span several pages) - it doesn't know which ones are "before" others (it can be determined, but it's not easy).
Aware IM Support Team
Post Reply