Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

R5 - Using formula language (fairly simple)

Status
Not open for further replies.

JoseQuiervo

Programmer
Sep 25, 2002
57
US
I want to have an @If determine that if the field value is >= 10 and <=25 and another field's value is >10, then the result will be "Failed". But using 3 &'s isn't working and I figured this out before, I'm just having a lapse this Friday afternoon.

Example of what's not working:
@If(Field1 >=10 & <=25 & Field2 >10; "Failed" ; Field2)

Thank you for the help, have a great weekend.
 
what about:

@If(Field1 >=10 & Field1 <=25 & Field2 >10; "Failed" ; Field2)


Leslie
 
I am trying to use the following formula to make sure that a field is equal to 9 characters. Does anyone have an idea as to what could be changed with the formula to make it work? I've moved a few things around, but still no luck.

@If (@Length(*fieldname)=9;@Success;@Failure("Number must be 9 characters"))
 
mldavis :

You should create a new post for this question.
Are you controlling a number field, or a text field ?
Your control is almost good for the Validation formula of a text field.
I would have written it like this :
Code:
@If(@IsDocBeingSaved & @Length([i]fieldname[/i])=9;@Success;@Failure("Number must be 9 characters"))
Unfortunately, this control does not work for a Number field, because @length can only be used on text.
Therefor, if it is a number you need to do this :
Code:
@If(@isDocBeingSaved & @Length(@Trim(@Text([i]fieldname[/i])))=9;@Success;@Failure("Number must be 9 characters"))

Pascal.
 
Thank you, but the formula was fine...just needed to hit a key that I didn't think to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top