Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2745 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted
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
Posted

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.

This topic is 2745 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.