653
Views
15
Comments
replace()
Question

Hi,

i need to replace , with ',' how can i acheive it

SyntaxEditor Code Snippet

Replace(Target,(","),("','"))

where target contains the values( value1,value2,value3)


thanks,

Ronan T.


Rank: #1826

Ronan T wrote:

Hi,

i need to replace , with ',' how can i acheive it

SyntaxEditor Code Snippet

Replace(Target,(","),("','"))

where target contains the values value1,value2,value3


thanks,

Ronan T.



Can u try this 

SyntaxEditor Code Snippet

Replace("target",",","','")


Rank: #96
Replace(Target, ",", "','")

Should be working.

This will change 

value1,value2,value3

To 

value1','value2','value3

Rank: #96

Hey Ronan,

You might be doing something else which changes it to a " " instead...

Replace("123,35678,468", ",", "','")

Output: 


mvp_badge
MVP
Rank: #5

Hi Ronan,

What's the version of the platform you are using?

Please, provide a small module where you use this function like you are using in your code, that reproduces your problem, and attach here.

As others already stated, it should work. So, it is very strange if for you it does not.
A module reproducing the problem will help understand where is the problem.

Cheers.

mvp_badge
MVP
Rank: #2

Hi Ronan,

Have you even debugged? And checked in the debugger the result of the Replace() directly after it executed, instead of relying what you're seeing on your screen? If not, please do so, instead of keeping three (four including me) community members busy with what should be a no-breainer? Thanks.

Rank: #96

I'd like to present a screenshot, running on P10.


You sure you are not encapsulating the string somewhere with escapehtml orso?

HI OutSystems ,

                    Let me know how to DE serialize  the following JSON String . Am not able to DE serialize the JSON String .

"[{""WoEntry"":4190,""WoNum"":4593,""U_DocDate"":""16-09-2020"",""U_ItemCode"":""RSS-PL-25ARUL-W"",""U_ItemName"":""ModelNo:RE-25ARConven 4 Zone Agent Release FACP White with 2 Release Module-UL Listed"",""WOQty"":25.000000}]"



mvp_badge
MVP
Rank: #2

Hi Satish,

Your question has absolutely noting to do with the original topic. Please start a new topic.