We have reset all users FileMaker related profile fields. Please take the opportunity to update your information,  this will provide background to members whom read your posts. Click here.

Jump to content

Recommended Posts

jagstirling    0

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

 

 

WeekPicker.jpg

Edited by jagstirling

Share this post


Link to post
Share on other sites
comment    1,356
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.

  • Like 1

Share this post


Link to post
Share on other sites
jagstirling    0

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×