Crow Canyon Software Forum
Auto fill column with age based on date of birth
Quote from ab_nj_it on July 17, 2023, 10:04 pmMoved this post from other topic:
Hi All
I have a form with [Child 1 DOB] in one column and wish to auto populate the [Child 1 Age] column based on this data.
I managed to get a formula working =ROUND(((TODAY()-[Child 1 DOB])/365.25),0)&" Years"
BUT it refuses to display on the form. I can add that column from Form Controls but when viewing the form it is missing
Moved this post from other topic:
Hi All
I have a form with [Child 1 DOB] in one column and wish to auto populate the [Child 1 Age] column based on this data.
I managed to get a formula working =ROUND(((TODAY()-[Child 1 DOB])/365.25),0)&" Years"
BUT it refuses to display on the form. I can add that column from Form Controls but when viewing the form it is missing
Quote from pf-amalin on July 18, 2023, 12:04 pmHave you tried this?
- In the left-hand column of Forms Designer, go to Advanced>Form Event Actions.
- Add a + New Configuration; Execute on column value change and add [Child 1 DOB] as the column (you could also check Execute on Form Load if needed)
- + New Action>Update Form Controls>+ New Mapping
- [Child 1 Age] as the column
Add the formula as the Value, or use a JavaScript if needed.- Ok/save all the way back out and test.
Have you tried this?
- In the left-hand column of Forms Designer, go to Advanced>Form Event Actions.
- Add a + New Configuration; Execute on column value change and add [Child 1 DOB] as the column (you could also check Execute on Form Load if needed)
- + New Action>Update Form Controls>+ New Mapping
- [Child 1 Age] as the column
Add the formula as the Value, or use a JavaScript if needed. - Ok/save all the way back out and test.
Quote from ab_nj_it on July 20, 2023, 7:15 pmThis is the formula I got working during testing on a calculated value column [Child 1 Age]
=ROUND(((TODAY()-[Child 1 DOB])/365.25),0)&" Years"
but if I put this in th evalue of the New Mapping, it does not calculate but just copies the formula to the [Child 1 Age] column
Not sure how to achieve the same result using the Function list provided.
Suggestions most welcome
https://www.crowcanyon.help/article/comprehensive-list-of-functions-in-nitro-studio/
This is the formula I got working during testing on a calculated value column [Child 1 Age]
=ROUND(((TODAY()-[Child 1 DOB])/365.25),0)&" Years"
but if I put this in th evalue of the New Mapping, it does not calculate but just copies the formula to the [Child 1 Age] column
Not sure how to achieve the same result using the Function list provided.
Suggestions most welcome
Quote from supportTeam on July 26, 2023, 4:44 pmHi @ab_nj_it,
Calculated columns are visible only in display form and not in new and edit forms. This is because they are read only columns and we cannot write or modify their values. Please check the calculated column in NITRO display form.
Please note that this behavior of NITRO Forms is same as SharePoint forms.
Hi @ab_nj_it,
Calculated columns are visible only in display form and not in new and edit forms. This is because they are read only columns and we cannot write or modify their values. Please check the calculated column in NITRO display form.
Please note that this behavior of NITRO Forms is same as SharePoint forms.