NetTalk Central

Author Topic: Sort after insert record problem  (Read 5103 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Sort after insert record problem
« on: October 29, 2016, 05:33:02 AM »
I have a date field as the only sort field on a browse and have the "Default to Descending" ticked on.

When returning from adding a new record the sort is not obeyed ie. I want the browse to show the
newly added record as the first record in the browse. How can this be obtained.


Ashley

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort after insert record problem
« Reply #1 on: October 30, 2016, 09:49:02 PM »
I'd need to see an example Ashley.
Can you duplicate this in a shipping example?

cheers
Bruce

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Sort after insert record problem
« Reply #2 on: October 31, 2016, 03:57:11 AM »
Hi Bruce,

This is a SQL table, I will try to get something.


Ashley

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Sort after insert record problem
« Reply #3 on: November 01, 2016, 01:37:55 AM »
Hi Bruce,

Testing different scenarios and here is what I found.

When inserting a record the sort is actually correct, but instead of going to the first page
it goes to the last page of records when saved instead of the first page of records.

How would one make it select the first page on after a insert record?

Ashley

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort after insert record problem
« Reply #4 on: November 01, 2016, 09:36:37 PM »
I'd need to see an example to answer this question Ashley.
Can you duplicate in one of the shipping examples? Maybe the MsSql (73) one?


cheers
Bruce

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Sort after insert record problem
« Reply #5 on: November 02, 2016, 04:58:59 AM »
Hi Bruce,

What MSSQL database should I use or where is it?

I tried the the WebApp 31 and that worked correctly, of course it is using tps files.

From what I can gather this seems to be a problem with SQL.


Ashley
« Last Edit: November 02, 2016, 05:44:54 AM by astahl »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort after insert record problem
« Reply #6 on: November 02, 2016, 06:57:01 AM »
there's an example in \examples\nettalk\web server\mssql (71)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Sort after insert record problem
« Reply #7 on: November 02, 2016, 08:47:30 AM »
Hi Bruce,

Yes there is but when I compilied and ran it it was asking me for database which I guess I did not have.

That's fine. I resolved the issue with a design change. I now call the form as a browseless form from the menu using ?insert_btn=insert, and upon save I call the browse as a URL.

This combo works very well and has solved the issue. I do however believe this may be a MySql table problem. If you are saying that the MSSql app works then I confirmed my thought.

This maybe something to look at in the next NetTalk Webinar.


Ashley