cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1026
Views
0
Helpful
1
Replies

Need to write a formula in ICM to strip some PV data, but not all...

cherilynn1030
Level 1
Level 1

In previous steps of the ICM call flow, we are setting PV6 with some call data.  For example, Parts^(DateTime)^N^N.  The carrot is just for a separator.

In a later step, we want to change the Parts to be Sales, but we don't want to delete the datetime and ^N^N.  How can I write a formula to strip the first part of the call variable, but leave the remaining and insert the new portion "sales?"

ICM 7.5

CVP 7.0

I'm racking my brain on this one here.

Thanks all!

Cheri

1 Accepted Solution

Accepted Solutions

jessepbeatty
Level 1
Level 1

Try setting PV6 to:

concatenate("Sales",right(Call.PeripheralVariable6,(len(Call.PeripheralVariable6) - find("^",Call.PeripheralVariable6))))

The find function will give you the character number of the first occurrance of whatever you specify, so combining "Sales" with the rightmost number of characters of the PV should do the trick. To determine the rightmost (if the Parts part is variable length) you want the total length minus the first x characters before your "^".

I haven't tested it out, so you may need a +1 or a -1 in there somewhere before the last two parentheses to get the exact right length.

Update: I just tried it out in Excel. As posted, it will not include the first "^", so you'll either need to have:

concatenate("Sales^",.....

or

concatenate("Sales",...))+1))

View solution in original post

1 Reply 1

jessepbeatty
Level 1
Level 1

Try setting PV6 to:

concatenate("Sales",right(Call.PeripheralVariable6,(len(Call.PeripheralVariable6) - find("^",Call.PeripheralVariable6))))

The find function will give you the character number of the first occurrance of whatever you specify, so combining "Sales" with the rightmost number of characters of the PV should do the trick. To determine the rightmost (if the Parts part is variable length) you want the total length minus the first x characters before your "^".

I haven't tested it out, so you may need a +1 or a -1 in there somewhere before the last two parentheses to get the exact right length.

Update: I just tried it out in Excel. As posted, it will not include the first "^", so you'll either need to have:

concatenate("Sales^",.....

or

concatenate("Sales",...))+1))