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

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

Recommended Posts

Posted

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?

Posted

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

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

Posted

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

Posted

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.

Posted

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.

  • 3 years later...
Posted

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

Posted

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.

Posted

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

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

  • Like 1
Posted

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.   :)

Posted

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!

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