Home > Ask the Domino Experts > Questions & Answers > A field with an identity crisis
Ask The Domino Expert: Questions & Answers
EMAIL THIS

A field with an identity crisis

Hans van der Burg EXPERT RESPONSE FROM: Hans van der Burg

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 06 June 2003
I have a layout region with a pop-up calendar for the users' birthdays. I have another field that is supposed to calculate the users' ages. The age (number/computed) field has the following formula but it causes an error stating that it should be a date/time field. Unfortunately this also fails when I change it to date/time format:
@Text(@If(@Month(@Today) 
@Month(Birthday); @Year(@Today) - 
@Year(Birthday); @If(@Day(@Today) 
< @Day(Birthday);
 (@Year(@Today) - @Year(Birthday)) - 1; 
@If(Birthday = ""; "Ageless"; @Year(@Today) 
- @Year(Birthday)))))

>
The check if the birthday field is empty or not is done at the end of the formula. In the event that birthday is empty, the beginning of your formula will fail. This is because your are performing date/time functions on an empty value, which is not allowed. Move the check for an empty Birthday field to the top of the formula. For instance:
@If(Birthday="";"Ageless";
<<<your formula here>>>)

Do you have comments on this Ask the Expert Q&A? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Lotus Notes Domino Formula Language
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Do I use Formula or LotusScript to include a doclink to a Notes view?
Top 10 Lotus Notes/Domino coding and development tips of 2008
Provide rich-text formatting via the Profile document and Formula
Top 10 Formula language tips
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Stop response documents from showing in a Lotus Notes form
Formula language button manages Deny Access list searches

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts