NetTalk Central

Author Topic: 2 anomalies - dates and times  (Read 3463 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
2 anomalies - dates and times
« on: January 13, 2012, 02:03:57 AM »
1. The easy one - I have a  time field but if I enter either 08:00 or 8:00 (meaning 8AM) it displays fine but when you save, it saves as 12:08.
2. I have a standard page loaded browse of appointments which is controlled by a Memory form (just so I can add some buttons). One of the buttons filters appointments (say This Week). The first page is OK but when you press Next you get all appointments. Presumably this is because it is a page loaded browse. My code is in the Browse Validate method as usual. is there any way to ensure this still filters when presseing Next or is this a bug?

Thanks

John

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: 2 anomalies - dates and times
« Reply #1 on: January 13, 2012, 02:28:17 AM »
1. The easy one - I have a  time field but if I enter either 08:00 or 8:00 (meaning 8AM) it displays fine but when you save, it saves as 12:08.
> try to play with the time formatting picture or leave it out and see what happens.
2. I have a standard page loaded browse of appointments which is controlled by a Memory form (just so I can add some buttons). One of the buttons filters appointments (say This Week). The first page is OK but when you press Next you get all appointments. Presumably this is because it is a page loaded browse. My code is in the Browse Validate method as usual. is there any way to ensure this still filters when presseing Next or is this a bug?
> I would say it is probably your filter. I use page loaded browses everywhere and don't have this prob. Add in a trace to see the value of your filter before and after the Next button is pressed

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 2 anomalies - dates and times
« Reply #2 on: January 13, 2012, 04:24:30 AM »
>> I have a  time field but if I enter either 08:00 or 8:00 (meaning 8AM) it displays fine but when you save, it saves as 12:08.

you write that as if it's a bad thing?
(fixed for 6.15)
« Last Edit: January 13, 2012, 04:31:38 AM by Bruce »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 2 anomalies - dates and times
« Reply #3 on: January 13, 2012, 04:34:39 AM »
>> I have a standard page loaded browse of appointments which is controlled by a Memory form (just so I can add some buttons). One of the buttons filters appointments (say This Week). The first page is OK but when you press Next you get all appointments.

>>  Presumably this is because it is a page loaded browse. My code is in the Browse Validate method as usual.


>> Is there any way to ensure this still filters when pressing Next or is this a bug?

It's a bug, but in your code. This happens when you use a "value" instead of a "session value" in your filter. If you are using code in Validate then post the code here. If you have set the filter in the template, then post that here to.

Cheers
Bruce




John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: 2 anomalies - dates and times
« Reply #4 on: January 13, 2012, 06:31:12 AM »
Oh - in the Vaildate method I have:

 d# = ITD.GetThisMonth(today(),GLO:StartDate,GLO:EndDate)

This basically an ITUtils method to return GLO:Start and End Date.

Then in the Browse Vaildate method I have:

If GLO:StartDate > 0 and GLO:EndDate > 0
    If Dia:Date < GLO:StartDate or Dia:Date > GLO:EndDate
        Cycle
    END
END

So I think I see what is happening so rather than use GLO:Start/End (which are threaded) I need a session variable?

Thanks

John