NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: astahl on October 29, 2016, 05:33:02 AM

Title: Sort after insert record problem
Post by: astahl 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
Title: Re: Sort after insert record problem
Post by: Bruce 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
Title: Re: Sort after insert record problem
Post by: astahl on October 31, 2016, 03:57:11 AM
Hi Bruce,

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


Ashley
Title: Re: Sort after insert record problem
Post by: astahl 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
Title: Re: Sort after insert record problem
Post by: Bruce 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
Title: Re: Sort after insert record problem
Post by: astahl 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
Title: Re: Sort after insert record problem
Post by: Bruce on November 02, 2016, 06:57:01 AM
there's an example in \examples\nettalk\web server\mssql (71)
Title: Re: Sort after insert record problem
Post by: astahl 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