How do I maintain Alpha Order on a Maintenace Form


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I fill my business object by 'Select * from cowboys order by cow_lastname, cow_firstname' and then it comes in alphabetically. But when I add a new cowboy how do I keep the data in Alpha order? The form is a SF maintenance form but the navigation keys no longer work after I add a new cowboy. ???? TIA.
Replies
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OK the mud is starting to thin a bit. The BO is Dynamic and since the sort is on cust_lastname and cust_firstname it makes sense that as soon as those are added then the BO reshuffles and the form is filled with other data. According to what you have said it seems I have the following options.

If I use the Sort event:

It sounds like I could turn the sort off when adding and editing and as soon as they are over turn it back on. At that time I guess I would refresh the BO. I understand this concept but I do not understand how\where I would do these. I am sure I would turn it off beforesave and beforeedit if these events exists I will look and see and probably turn it on in aftersave.

If I don't use the Sort but use the Order by in the Select:

I would some way have to refresh the BO after saving the new record or saving the edit. Again where/how?

I will start looking at events of the BO and see what a come up.

Again Thanks you so much.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K

It sounds like I could turn the sort off when adding and editing and as soon as they are over turn it back on. At that time I guess I would refresh the BO. I understand this concept but I do not understand how\where I would do these. I am sure I would turn it off beforesave and beforeedit if these events exists I will look and see and probably turn it on in aftersave.

Yes, but you will constantly be fighting this...my recommendation would be to use the ORDER BY within the query in this particular scenario.  Where you place this depends on what you are trying to accomplish, but BeforeAddNew would be one place to turn it off and AfterSave you could turn it back on.

I would some way have to refresh the BO after saving the new record or saving the edit. Again where/how?

In the AfterSave event you could resort the BO:

MyBO.Sort = "cust_LastName"
MyBo.CopyDataFrom(MyBo, ClearnAndFillFromDefaultView)
MyBo.SOrt = ""

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Terry Bottorff - 17 Years Ago
Greg McGuffey - 17 Years Ago
Trent L. Taylor - 17 Years Ago
                 OK I will and let you know.
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ivan George Borges - 17 Years Ago
Terry Bottorff - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
Terry Bottorff - 17 Years Ago
StrataFrame Team - 17 Years Ago
Terry Bottorff - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Terry Bottorff - 17 Years Ago
             Glad you got it going :)
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search