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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Field Minus 1 formulua

Status
Not open for further replies.

troop49

Programmer
Dec 17, 2009
17
US
This is my Field values
01
1
2
3
4
5
6
7
8
9
CL
But I need to just minus 1 from the data string for display.if the field is 5 should display a 4.Thanks.
 
Have you tried a formula like :

{field}-1
 
This is my formula:

({ESYAPPTR.STEP}) - 1

____________
I received this email.

Error Message:
"A number, currency amount, date, time, or date-time is required here.
 
@number
If isnumeric(yourstringfield) then tonumber(yourstringfield)-1 else yourstringfield.

Ian
 
Are the "01" and "CL" part of the series? Try:

if isnumeric({ESYAPPTR.STEP}) then
totext(val({ESYAPPTR.STEP})-1,0,"") else
{ESYAPPTR.STEP}

-LB
 
WOW!!!! this did it.
I didn't understand how to convert a string to a numeric so the math calc could take place.
Thank You!
Thank You!
 
OOPS

LBs solution is correct, I forgot to turn number back to text

If isnumeric(yourstringfield) then totext(tonumber(yourstringfield)-1,0,"") else yourstringfield.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top