April 1, 200817 yr I though this would be a breeze, but it is driving me batty. I need to change a layout between the hours of midnight and midday. In other words, if the current time is between midnight and midday, go to layout A, otherwise go to layout B. This is activated by a button, so I don't need any scheduling plug-ins or anything like that. My script currently reads: If(Get ( CurrentTime ) ≥ "00:00:01" and Get ( CurrentTime ) ≤ "11:59:00" then go to layout A Else go to layout B. So my machine time is 14:26 - when I run the script, it goes to layout A. When I look at Get(currentTime) in DataViewer, it shows 3:26PM - so maybe this has something to with 24-hour clock? I've tried using a Let function, but it still doesnt do what I think it should. I also tried using Get(CurrentTimeStamp). Any suggestions? Thanks Steve aka Dubl TaxiCab Manager Taxi Owner & Taxi Fleet Management Software www.taxicabmanager.com m: 0414 555 195ew Edited April 1, 200817 yr by Guest
April 1, 200817 yr Try GetAsNumber ( Get(CurrentTime) ) Goto Layout A Else Layout B Filemaker stores time as seconds from 0 - 86399 since there are 86400 seconds in a day. Edited April 1, 200817 yr by Guest
April 1, 200817 yr Hi Dubl, long time no see. I think you need to use the Time Function as well Get ( CurrentTime ) ≥ Time ( 0 ; 0 ; 0 ) and Get ( CurrentTime ) ≤ Time ( 22 ; 0 ; 0 ) adjust the second time to what you need, Lee
April 1, 200817 yr Try this: Set Variable [ $t; Get ( CurrentTime ) ] If [ $t > 0 and $t < 43200 ] * Sorry didnt see the other posts. Edited April 1, 200817 yr by Guest
April 1, 200817 yr Author Thanks Ocean, Lee and Mr. Vodka All good now - although at first I tried all three methods and it STILL wasn't working, until I realised that when changing my machine time to test it I had inadvertently set the time to AM instead of PM. DOH! Appreciate the quick responses very much :)
Create an account or sign in to comment