NetTalk Central

Author Topic: Browse allways at first record, how to  (Read 2440 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Browse allways at first record, how to
« on: May 16, 2014, 04:07:48 AM »
Hi,
I have a memory form with a browse
How to set the browse to point allways to the first record when I entre the form?
-----------
Regards
Alberto

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
    • Email
Re: Browse allways at first record, how to
« Reply #1 on: May 16, 2014, 04:39:01 AM »
put this on generate form

p_web.SetValue('_refresh_','first')


Robert

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Browse allways at first record, how to
« Reply #2 on: May 16, 2014, 05:01:11 AM »
Thanks

8.11

I put this on generate form/start and it does not work
-----------
Regards
Alberto

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
    • Email
Re: Browse allways at first record, how to
« Reply #3 on: May 16, 2014, 05:29:59 AM »
For me works.
How do you test?

Robert

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Browse allways at first record, how to
« Reply #4 on: May 16, 2014, 05:32:08 AM »
Select a redord in the middle of the browse

Go to another page and return to the browse page
-----------
Regards
Alberto

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
    • Email
Re: Browse allways at first record, how to
« Reply #5 on: May 16, 2014, 05:49:35 AM »
ok. This code will works if you go in browse press next button then go to another page and then come back.
But if you stay on the same page and select another record then first, then this code will not work because you are already on first page.
So this way my code will not help you.

Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse allways at first record, how to
« Reply #6 on: May 18, 2014, 11:12:39 PM »
Robert's approach is good, but clear the SessionValue of the ID field (of the browse) as well.
That way it will go to the first page, but it won't have "remembered" which field on the first page it was on last.

cheers
Bruce