Skip to Content
0
Former Member
May 13, 2010 at 09:42 PM

Use of CP for condition statement

190 Views

Hi,

I need to set a conditions like below:

If field1 contains value '1*' the set flag = 1.

If field1 contains value '2*' the set flag = 2.

If Field1 has values like 10,11,12 ...i need to set flag = 1.

If field1 has values like 20,21,22 ...i need to set flag = 2.

How do i write the above?DO I need to use CP as shown below?

If field1 CP '1*'.

flag = '1'.

endif.

If field1 CP '2*'.

flag = '2'.

endif.

Thanks.