Designer Formula question

Posted on 2006-11-07
Last Modified: 2013-12-18
I need a formula for a form that says if field A is <=5 and field B is NULL return an error.  If field A is >= 5, field B can be blank.

I keep getting an error that comparison operators must be supplied two values of the same data type.
Question by:dabneym
  • 3
  • 2
LVL 63

Expert Comment

ID: 17893515
1) Formula sometimes has isues with trying to detect nul fileds.

What kind of fields are these ( String, numerical ? )

t may be wise to convert them according to the type of compare needed.

If A  is a string convert it to a number first.

I hope this helps !
LVL 63

Expert Comment

ID: 17893534
@TextToNumber may be useful.

Please post your formula so that we can try to correct it.

I hope this helps !

Author Comment

ID: 17893544
A is a numerical rating, B is a text field for comments.  I need the formula to require comments if the rating is less than 5.

Author Comment

ID: 17893554
@if(Rating="";@failure("You must enter a Rating");@Success);
@If(Rating<=5 & Comments=""; @Failure("You Must Enter Comments if Rating is 5 or lower");@Success);
@If(Rating=>5 & Comment=""); @Success
LVL 63

Accepted Solution

SysExpert earned 125 total points
ID: 17893602
Correct the last 2  :

@If(@TextToNumber(Rating)<=5 & Comments=""; @Failure("You Must Enter Comments if Rating is 5 or lower");@Success);

@If(@TextToNumber(Rating)>5 & Comment=""); @Success

I hope this helps !

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question