• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

IIf Alias

Hello,
I have a bunch of fields that are requiring "N/A" if the end user hasn't entered any data.  The code I'm using for the source is as follows.
=IIf([Close Date]<=0,"N/A",[Close Date])

Now, this works for numbers but not for text entries.  How can I edit this code to work for text entries?
0
napsternova
Asked:
napsternova
  • 2
1 Solution
 
Dale FyeCommented:
Try the NZ() function.

=NZ([Close Date], "N/A")

This will work if no data has ever been entered, but if data was entered, saved, and then deleted, it probably won't.  In that case, you might try:

= IIF(LEN([Close Date] & "") = 0, "N/A", [Close Date])
0
 
Rey Obrero (Capricorn1)Commented:
first, you have to set the Data type of the field to Text, if it is not set as Text.
0
 
napsternovaDeveloperAuthor Commented:
Easy as pie.  Thank you soooo much!
0
 
Dale FyeCommented:
your welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now