Jump to content
Server Maintenance This Week. ×

refreshing field


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

Recommended Posts

Hello, i have got a problem with dates...

i have got couple fields:

monday, sunday, week id and i want to change every time when i run filemaker, because for example in sunday everyting was OK but in monday (week id should change to next one, monday and sunday date too) it's not working until i change something in code!!!

How can i autorefresh this fields (this fields are in every record)

Link to comment
Share on other sites

From your description I haven't got a clue what you want to achieve but you can make any field update itself dynamically by making it a calculation field and check the 'do not store results' checkbox.

Using this method if you were to put the calculation

Get(Currentdate)+1

into a field it would always show tomorrows date.

An alternative method would be to run a startup script whenever you fire up FM and use a series of setfield script steps to set your fields to whatever you want them to be.

I do not know if that helps

Phil

Link to comment
Share on other sites

ok, so... i have got field:

monday = Get(CurrentDate)- DayOfWeek(Get (CurrentDate))+2 and it's display date of monday in this week (based in week id)

sunday = Get(CurrentDate)- DayOfWeek(Get (CurrentDate))+8 and it's display date of sunday in this week (based on week id)

weekid = Floor ((Get ( CurrentDate ) - ( Date ( 4 ; 1 ; Case ( Month ( Get ( CurrentDate ) ) < 4; Year (Get ( CurrentDate )) - 1 ; Year (Get ( CurrentDate ) ))) - DayOfWeek ( Date ( 4 ; 1 ; Case ( Month ( Get ( CurrentDate ) ) < 4; Year (Get ( CurrentDate )) - 1 ; Year (Get ( CurrentDate ) )))) +2 )) /7) and its display TAX WEEK ID... (p.s. now is 38 - in england)

and if i create a record, fields display weekid of week when i crate record! and if week is changed then in some records i have got previous weekid.

I'm sorry but i don't know how to explain it in english and sorry for my english!!

But i think "From your description I haven't got a clue what you want to achieve but you can make any field update itself dynamically by making it a calculation field and check the 'do not store results' checkbox." should work!!

Thx

Edited by Guest
Link to comment
Share on other sites

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