May 27, 20178 yr Hi, I am looking for a simple method to select a week in a year, based on an assumption that there are 48 weeks in a year (see mock up attached, where the grey week buttons are clickable). The calendar picker in FM is great, but not suitable for my requirements, but I WOULD like my requested solution to be accessed in the same way (maybe returning something like YEAR, MONTH, WEEK_NUM. Also, not that bothered if the week are 1-4 for each month or 1-48. Has anything been built that i could leverage? Thanks Edited May 27, 20178 yr by jagstirling
May 27, 20178 yr 2 hours ago, jagstirling said: see mock up attached, where the grey week buttons are clickable So why don't you implement your mockup as a popover containing 48 buttons, all running the same script with a different parameter? For simplicity, let's say the parameter is just a number between 1 and 48. Then your script could do: Set Field [ YourTable::Year ; AnyTable::gYear ] Set Field [ YourTable::Month ; Div ( Get (ScriptParameter) - 1 ; 4 ) + 1 ] Set Field [ YourTable::Week ; Mod ( Get (ScriptParameter) - 1 ; 4 ) + 1 ] where gYear is a the (global) field shown at the top of your picker. 2 hours ago, jagstirling said: Also, not that bothered if the week are 1-4 for each month or 1-48. Well, then you don't really need a Month field and could make this even simpler.
May 31, 20178 yr Author Thanks for this. I am an AB-SOL-UTE newbie in Filemaker, but I have convinced my company to buy a licence so I hope this will change. I will search up 'popover' and take it form there.
Create an account or sign in to comment