Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update calculated field

Status
Not open for further replies.

ouzojd

Programmer
Jun 9, 2002
314
0
0
AU
Just a quick one, I have a list with a calculated field, works good, but does anyone know how often and if a calculated field is recalculated. It does recalculate if I open the item in the list and save it again.

Thanks
 
Further research leads me to believe a calculated field is stored in the db and not recalculated by SQL 2000 ever.

Does anyone know of a workaround for this, maybe even some javascript for the page the list appears on to do the calculation on the client side?
 
If you want the field to be recalculated, how about sharing some information on what the field is and what it is used for. If you add that, I'll see if I can help!

[cat2] *Suzanne* [elephant2]
[wavey] [wiggle]
 
Well, I read a post somewhere that said you could use [Today] in the calculation of a calculated field if you first added a column to a list called today, added the calculatied field column then deleted the today coulmn.

That is true, it worked. So I thought I could have a staff list of birthdays that showed staff having birthdays in the a. either the next 30 days or b. the current month.

I can get the 30 days thing working but this would involve changing the date every year as the reoccurrence on the Event has a begin and end date but doesnt have a date when the next reoccurrence is due. I can also do a calculated field for the current month but this only works the staff member is first entered or updated.

I dont have any other ideas. Nothing too important, just would be nice and I'm sure I could apply the solution to other situations.
 
I'm not sure I have a solution for you. You may have to update every year b/c I really thought about it and cannot think of any other way.

My system uses the 30 days thing, however this is a "soon to expires" date, so it HAS to be updated (save and close) and therefore I wouldn't encounter this problem.

You could probably make it easy on yourself if you made an Datasheet view (just for you) where you can change all the dates every year without having to open each one up.

Hope that helps somewhat!

[cat2] *Suzanne* [elephant2]
[wavey] [wiggle]
 
I had a thought Suzanne, but what about linking the list to an Excel spreadsheet, putting a formula in the Birthday field that is something along the lines if cell.value > Today then + 1 year then righting a vb app to open the Spreadsheet, synchronise the list and close. Then putting the vb app as a scheduled task to run once a year or month.

Long way around but what do you think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top