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

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

Recommended Posts

Posted

I am trying to create a calender in FM. I have a seperate layout for each month, and each layout contains a text field for each day. It's going to be used as a kind of Holiday Board. On another layout I have a field "go to date", if I put in 1.1.2002 how can I get the script to go the specified date?::?:?:? tongue.gif" border="0

Posted

An idea:

Make the "go to date" field three separeted global fields (G_day, G_month, G_year) and a number field (Counter).

Then in a script try this,

Go To Layout ["G_Month"] -- Choose the option: Layout number from field i.e. 1=January, 2=February, ...

Set Field["Counter",""""]

Go to Field["Day_one"]

Loop

Set Field ["Counter","Counter + 1"]

Exit Loop If ["Counter = G_Day"]

Go To Next Field

End Loop

I hope this works for you,

laugh.gif" border="0ZZ

Posted

I developed a simple calendar in FM5 that requires only 2 layouts. The idea is that 1 record = 1 week. Start with 7 fields. Sun is a Date, Mon thru Sat = Sun+1, respectively. The 7 dates allow 7 portals across, each related by date to "Events" (Relationship Sun::Event_Date) The key is to create one record and enter a date that IS A SUNDAY into Sun.

Then create calc fields Next_Sun=Sun+7 and Prev_Sun=Sun-7. You can use them in a relationship that would add next/prev week at the click of a button, so you don't have to pre-populate the calendar with dates, and the OS takes care of leap years! Next week button script = Set field (Next_Sun::Sun) = Sun+7, Go To Related Next_Sun

Then create 2 text calculation fields, ID_Week, and ID_Month.

Week = NumToText(Year(Sun)) & " " & NumToText(WeekofYear(Sun)) &"(paragraph)" & NumToText(Year(Sat)) & " " & NumToText(WeekofYear(Sat))

Month = NumToText(Year(Sun)) & " " & NumToText(Month(Sun)) &"(paragraph)" & NumToText(Year(Sat)) & " " & NumToText(Month(Sat))

Now, all you need are 3 global fields, Today, ID_Week_Global, ID_Month_Global

and a 5 scripts. Open, Next Week, Prev Week, Next Month, Prev Month.

The Open script makes Today the current date, sets

Week_global=TextToNum(Year(Today)) & " " & TextToNum(WeekofYear(Today))

Month_Global=TextToNum(Year(Today)) & " " & TextToNum(Month(Today))

Then Go To Related Record (ID_Month_Global = ID_Month)

Next month button sets Today to Today + 1 month, resets the globals, goes to related record.... you get the idea now? Tricky to get your mind around, but is very simple, works great.

Posted

I have finaly sorted my previous problem. But if I have a group of 3 people, I need an error message to come up if 2 or more of them have there name in the same field. I did use pattern count which worked fine for other groups containing 2 people, but 3 doesn't work?? shocked.gif" border="0shocked.gif" border="0shocked.gif" border="0

PS; When using pattern count, what happens if the group contains more then 2 people.

This topic is 8339 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.