Newbies jomike Posted August 14, 2007 Newbies Posted August 14, 2007 I know it's been asked several times and I have read all the threads I could find, but heres my question. I have a field named DOB "date of birth" and I have another field named Age when I enter the DOB I want the age to calculate and fill in automatically. From what i have read you need to create a custom function which I have seen several on here. And I understand how and where to create it but what I don't understand is how to apply it to my fields that I want calculated. If anyone could point me in the right direction it would help allot.
aholtzapfel Posted August 14, 2007 Posted August 14, 2007 (edited) It depends on what you will be using the field for. If you just want to display it, make a calulation field(unstored). If you want to do finds on it will be slow(it will work but the bigger the table the worse it gets), relationships based on it would not work. If you need indexing(used for finds and relationships), you can "somehow" trigger a script to update the value daily. There are many ways to do this. (can you run a script like this in Server9? I havn't looked hard at that feature yet.) I've many thoughts on the "somehow" but there are many more qualified than me to give advice on that. Edited August 14, 2007 by Guest
Lee Smith Posted August 14, 2007 Posted August 14, 2007 Two days ago, this topic was posted Here in the Calculation Topic. Follow the leads to the other existing topics too. Lee
Newbies jomike Posted August 15, 2007 Author Newbies Posted August 15, 2007 I understand a custom function has to be made and I have no problem making it. The problem i have is using it. In one field I want to enter the birth date in another I want the age to show years old. I have tried making a script and specifying the custom function but all I come up with is a ?.
Lee Smith Posted August 15, 2007 Posted August 15, 2007 No, you do NOT need a Custom Function for this. Just put the calculation in Field. BTW, most CF calculations can be used in a normal Calculation Field. Lee
Vaughan Posted August 15, 2007 Posted August 15, 2007 Only functions that rely on recursion *need* to be custom functions.
Newbies jomike Posted August 15, 2007 Author Newbies Posted August 15, 2007 Thanks for all the help. I did away with the custom function idea and found the the right script and got it to work.
Recommended Posts
This topic is 6370 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 accountSign in
Already have an account? Sign in here.
Sign In Now