Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Refresh Get(Current Date)

Featured Replies

Hi there,

As far as I know the Get(Current Date) function is static and uses the computer clock date at the time the calcualtion is first created. I want the date to update at the start of every new day (at midnight) so that all date-dependent calculations auto-refresh too. How do I do this?

You don't need a Script for this, you need to unstore the calculation.

Go into Define Fields, select the field with the Get (CurrentDate) in it, select Options, Storage Options, and select the button that says Do Not Store Calculated Result, Re Calculate when needed.

HTH

Lee

  • 3 years later...

Hi sir

I'm new in Pro FM 11, In short I just can not understand what you say. Let me explain. you give an indication to run(or execute) the Get (current date) in a field. My problem is that I find absolutely nothing of what you say I can not find the way to run this simple trick. I juste whant to have in my field the current date when i open my layout....Now i dont understand why but ther is nothing in my control ... i see nothing ? If this is possible can you give me step by step indication to follow to make this thing "Get current date" working. thanks

Hi sir

I'm new in Pro FM 11, In short I just can not understand what you say. Let me explain. you give an indication to run(or execute) the Get (current date) in a field. My problem is that I find absolutely nothing of what you say I can not find the way to run this simple trick. I juste whant to have in my field the current date when i open my layout....Now i dont understand why but ther is nothing in my control ... i see nothing ? If this is possible can you give me step by step indication to follow to make this thing "Get current date" working. thanks

No, Lee did not say anything about running or executing something.

He suggested you modify something you have already created and therefore presumably know how to get to.

Go into Define Fields

Select the field with the Get (CurrentDate) in it

Select Options, Storage Options

Select the button that says Do Not Store Calculated Result, Re Calculate when needed.

Manage_DB.jpg

calculation.jpg

Hi there,

As far as I know the Get(Current Date) function is static and uses the computer clock date at the time the calcualtion is first created. I want the date to update at the start of every new day (at midnight) so that all date-dependent calculations auto-refresh too. How do I do this?

This is probably not actually a good idea.

It will be helpful if you describe more broadly what you are trying to do.

Hi BruceR

I miss a step because it does not work in "Specify Calculation"..... I'll try to be as clear as possible.

I have a field which is called CURRENT_DATE, I want when I open my layout as the current date is displayed in my fields current_date. Look what i do as shown in the help .I right click on my field and on the menu I choose "Setup Button", I click on "Perform Script" and I click on "specify". Now I select my script "DateX". My script contains the following code, "Insert Current Date [select; MyTable:: current_date]" ... But nothing happens I can not see my current date displayed in my field on my layout. Why... is it possible to do that.

Thanks and sorry for my bad english

Sylvain.

Please do not double-post:

http://fmforums.com/forum/showtopic.php?tid/216128/

  • 3 years later...

You don't need a Script for this, you need to unstore the calculation.

Go into Define Fields, select the field with the Get (CurrentDate) in it, select Options, Storage Options, and select the button that says Do Not Store Calculated Result, Re Calculate when needed.

HTH

Lee

Hi, there

When I disable the storage of the calculated result of the field, like Lee Smith said, i can’t get the data of that field in other table when i use it as a relationship key. How can i do this?

Thanks

i can’t get the data of that field in other table when i use it as a relationship key. How can i do this?

 

It would probably be best to open a new thread and explain why you want to use current date as the matchfield on the data side. Then we'll be able to see if there is another way to accomplish the same thing using an indexable field.

i'm sorry because language difficulties... i have some trends that i rent. one week to one client, other week to another... so, i have a date field used as a key to a relationship with another table, that have two fields called initial_date and final_date, containing a field with the client code. what i intend to do is let the final_date blank until the trend is with the client. to do this i have to use Get(CurrentDate) function when that field is empty and, as Lee Smith said, disable the storage of the calculated result of the field. but, when i do this, the table relationship doesn't work. the solution is storage calculation result and manually fill all the records with the current date at every day. do you have another solution? thanks

do you have another solution?

 

I might have, but I am not sure I understand the problem. Let's name the two tables, say Rentals and Viewer. IIUC, the calculation field is in the Rentals table and it calculates the end date of a rental as =

Case ( IsEmpty ( EndDate ) ; Get ( CurrentDate ) ; EndDate )

Is that more or less correct? If so, what difference would it make to the related set if the calculation were changed to =

Case ( IsEmpty ( EndDate ) ; Date ( 12 ; 31 ; 4000 ) ; EndDate )

which can be stored?

clever!!   :wink3:

We don't know that yet. :hmm:

Oh yes we do.  Whether for this instance or not remains to be seen but the concept is still very clever and consider it stolen.  Buck up and accept it.   :)

I might have, but I am not sure I understand the problem. Let's name the two tables, say Rentals and Viewer. IIUC, the calculation field is in the Rentals table and it calculates the end date of a rental as =

Case ( IsEmpty ( EndDate ) ; Get ( CurrentDate ) ; EndDate )

Is that more or less correct? If so, what difference would it make to the related set if the calculation were changed to =

Case ( IsEmpty ( EndDate ) ; Date ( 12 ; 31 ; 4000 ) ; EndDate )

which can be stored?

 

Yes, it works. Thank you very much!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.