# Use of function in mapping

Hello,

I need to put this logic in PI mapping.

If Qty = '0.000', then pass 'X' to delete_ind else pass ' ' to delete_ind.

How do I implement this? I had used equalA & ifelse function but it does not work.

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Sep 10, 2009 at 08:25 AM

If Qty = '0.000', then pass 'X' to delete_ind else pass ' ' to delete_ind.

```                constant[X]---> then
Qty--------------->equalS------->if---->delete_ind (Target Field)
constant[0.000]/ constant[ ]---> else

```

'map constant0.000 to equalS

constant[ ] to else

choose if from function category Boolean

equalS from function category Text

Edited by: Kubra fatima on Sep 10, 2009 10:25 AM

10|10000 characters needed characters exceeded
• Posted on Sep 10, 2009 at 08:13 AM

Hi,

Use like this

Qty

\

\ equalsA (Text equals) -- if then Constant 'X' -- delete_ind

'0.000', / else Constant ' '

Regards

Suraj

Edited by: S.R.Suraj on Sep 10, 2009 4:13 AM

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 10, 2009 at 08:28 AM

Hi,

you can use Fix Value Mapping, which is a standard function.

Conver 0.000 to X and set default value ans blank in case there is no match.

Regards,

Vikas

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 10, 2009 at 08:37 AM

yes you can also use FixValues standard function present under the function category Conversions

```Qty---->FixValues---->delete_ind
```

double click on FixValues to provide key and Value

```Key       Value
0.000     X
```

10|10000 characters needed characters exceeded
• Posted on Sep 10, 2009 at 09:33 AM
```Qty  ------------------------
| EqualsS(Text)| -- | IF | - Then -   Const('X') - |delete_ind|
Constant(0.000) ---------                                          Else - Const(' ')- |delete_ind|```

Regards,

Prasanna