on 12-13-2009 8:09 PM
Using Crystal XI, I need to create a formula to determine if the last 4 fields of a 30 field string contains 'PR' then the field is blank or 0, otherwise if the last 4 fields do not contain PR then my field would = my formula @AO. It seems easy but this is what I've tried and it isn't working: if "PR"in{IV00101.ITEMNMBR} [27-30] then 0 else{@AO}
Thanks,
Jayne
If there is no possibility of the field being NULL or being less then 30 characters, use this:
if "PR"in {IV00101.ITEMNMBR}[27 to 30] then 0 else{@AO}
// if the result of {@AO} is a string then in the above statement
// change 0 to "0"
Otherwise, use this:
if not(isnull({IV00101.ITEMNMBR})) and
"PR"in {IV00101.ITEMNMBR}[length({IV00101.ITEMNMBR})-4 to length({IV00101.ITEMNMBR})]]
then 0 else{@AO}
// if the result of {@AO} is a string then in the above statement
// change 0 to "0"
You might also want to check the case sensitivity of PR.
Edited by: Sanjay Kodidine on Dec 14, 2009 7:12 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.