Skip to main content

Can i know how to split the below description which is come in a Descr field as shown in below intended output. 

Value of the field:1. 1x GP- 39 Display Unit 2. 1x GPA -CO1 Antenna Unit with 10m Cable 3. 1x MU A25PF0017 Power Data Cable *2m2* 4. 1x Std Installation materials and spare parts 5. 1x Operational Manual

Intended Output:

1. 1x GP- 39 Display Unit

  2. 1x GPA -CO1 Antenna Unit with 10m Cable

  3. 1x MU A25PF0017 Power Data Cable *2m2*

  4. 1x Std Installation materials and spare parts

  5. 1x Operational Manual

 

Please check the below image.

 

Hi @malinthawarnakulasooriya08 ,

Text fields in the Report Designer support HTML.  You could use the replace function to replace your regular expression with an html line break, something like this:

=replace(eInventoryItem.Desc],’1x ‘, ‘<br>’)

I believe ConvertHtmlToText should be False, which is the default.

 

Hope this helps!

Laura


Thank you so much @lauraj46 .I tried it, but it is hard to get the intended output as below.

Intended Output

  1. 1x GP- 39 Display Unit

  2. 1x GPA -CO1 Antenna Unit with 10m Cable

  3. 1x MU A25PF0017 Power Data Cable *2m2*

  4. 1x Std Installation materials and spare parts

  5. 2x Operational Manual

I used the below function.

=IIf(aCROpportunityProducts.UsrAddItemDescription] <> null, Replace(  CROpportunityProducts.UsrAddItemDescription], '. ','{br}' ), '')

Hi @malinthawarnakulasooriya08 ,

Sorry, I didn't notice the line numbers in your example.  Is there a limit as to how many line numbers will be in the description?  You could try something like this:

=IIf(ICROpportunityProducts.UsrAddItemDescription] <> null, Replace(Replace( eCROpportunityProducts.UsrAddItemDescription], '2. ','{br}2. ' ), ''),'3. ',{br}3. ')

Repeat the nested Replace for each possible row number.

Hope this helps!

Laura 


Thank you so much @lauraj46 for the valuable guidance.


Reply