Skip to Content

How to display a field in SAP crystal if it contains a word like

Apr 10 at 12:02 AM


avatar image

Hi Team

I have a report that displays the below image:

But I am trying to figure out the correct formula that if the ItemDescription contains the words Black Feet, then the report will just display "romano chair" without the words "Feet"

My formula is..

if WorkOrder.ConfigProptext} like "*Romano Feet*" then ???????

Im not sure how to do it in cystal :(

romano.jpg (65.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Abhilash Kumar
Apr 10 at 07:34 AM

Hi Trish,

Create a formula with this code:

If {WorkOrder.ConfigProptext} like "*Black Feet*" then "Romano Chair"
Else {WorkOrder.ConfigProptext}


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks, what if there are 3 options for Romano. These may be Romano Chair, Romano 3-seater and Romano 2-seater.

How can I do the formula.

Basically if the description has the word "Feet" then remove it from the report and retain the first 2 words.

Ex. Romano 2-Seater with Black Feet.

Since it has the word "Black Feet"

then remove the words Black Feet

and it will just display Romano 2-Seater?


Modify the formula to:

If {WorkOrder.ConfigProptext} like "*Black Feet*" then (split({WorkOrder.ConfigProptext}, " ")[1] & " " & split({WorkOrder.ConfigProptext}, " ")[2]) 
Else s;


Ian Waterman Apr 11 at 07:31 AM

you could use Replace()

If only specific to Romana

If{WorkOrder.ConfigProptext}like"*Romana*" then

Replace({WorkOrder.ConfigProptext}, 'Black Feet', '')


If all black feet should be removed then

Rplace({WorkOrder.ConfigProptext}, 'Black Feet', '')


10 |10000 characters needed characters left characters exceeded