Ocean West Posted October 17, 2004 Share Posted October 17, 2004 open up Address Book and start editing someone's card. Select the Birthdate field and type "today" then hit Return. Next try "tomorrow", "next week", "last month", "next Tuesday". This code will replicate this functionality in FMP. Create a date field that does a GetAsDate(TextField) Create a field called "TextField" auto enter this calc, then uncheck the auto update. Let([ field = textfield; v_left = LeftWords(field;1); v_right = RightWords(field;1); words = WordCount ( field ); today = GetAsDate(Get(CurrentDate)); tomorrow = today+1; yesterday = today -1; thisday= DayOfWeek(today); NextDayNum= Case( v_right = "Sunday";1; v_right = "monday";2; v_right = "tuesday";3; v_right = "wednesday";4; v_right = "thursday";5; v_right = "friday";6; v_right = "saturday";7); LastDayNum= Case( v_right = "Sunday";7; v_right = "monday";6; v_right = "tuesday";5; v_right = "wednesday";4; v_right = "thursday";3; v_right = "friday";2; v_right = "saturday";1); weekday = Case(NextDayNum ? 1 and NextDayNum ? 7;1); nextmatrix = Choose(thisday; ""; "7Date.fp7.zip Link to comment Share on other sites More sharing options...
Ken Newell Posted January 19, 2005 Share Posted January 19, 2005 weekday = Case(NextDayNum ? 1 and NextDayNum ? 7;1) Stephen, What does the above line do in the calculation? Link to comment Share on other sites More sharing options...
-Queue- Posted January 19, 2005 Share Posted January 19, 2005 It is most likely the <= symbol, which doesn't work with the HTML. Link to comment Share on other sites More sharing options...
Recommended Posts