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

If Statement "reading" only first argument

Status
Not open for further replies.

alexlc

Technical User
Oct 7, 2004
39
GB
Hi,
Can someone let me know what I am doing wrong with this formula, it only returns the correct data relating to the first part of the statment. If I swap the "e" & "E" around it just works the other way.

I have tried the lowercase function, but am not entirely sure where to put it - any help gratefully recieved.

I am using Cry 9.

if {Booking.EditHistoryEventList} like "*Client Confirmed*" then
mid({@Crop_to_Start_Client_Confirmed},instr({@Crop_to_Start_Client_Confirmed},"entered by")+11)
else
mid({@Crop_to_Start_Client_Confirmed},instr({@Crop_to_Start_Client_Confirmed},"Entered by")+11)


Cheers Alex
 
Your formula, as it is currently set up, is telling Crystal that if "Client Confirmed" is in the {Booking.EditHistoryEventList} field return return the 11th character after "Entered by" otherwise return the 11 character afer "entered by". Is this what you want it to do?

I'm guessing that you want if "Client Confirmed is in the {Booking.EditHistoryEventList} field you want the 11th character after "ENTERED BY" no matter the case of "E". If this is your goal your formula would be:

if {Booking.EditHistoryEventList} like "*Client Confirmed*" then
mid({@Crop_to_Start_Client_Confirmed},instr(lcase({@Crop_to_Start_Client_Confirmed}),"entered by")+11)



Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top