Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
Convert Comma Separated into OR delimiter — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Convert Comma Separated into OR delimiter

Received Response
17
Views
2
Comments
edited Jun 16, 2021 7:33PM in Integration 2 comments

Summary

Convert Comma Separated into OR delimiter

Content

Hi, 

I am currently doing a logic on changing the data format from:

"listOfAccountNumbers" :  "0000001, 000002, 000003"

to 

0000001 OR 000002 OR 000003

but the replace() function is not supported on the version 2.0 xslt. I have tried the translate() function but it only updates the first single character.

Is there any way on how could I convert it?

Thank you!

 

 

  

 

Version

Version 2.0 XSLT

Code Snippet

  <xsl:template match="/" xml:id="id_11">
              <xsl:variable name="currentAccountnumber" select="translate(/nssrcmpr:execute/nsmpr0:request-wrapper/nsmpr0:APIRequest/nsmpr0:listOfAccountNumbers, "", &quotOR")"/>
              <nstrgmpr:execute xml:id="id_12">
                    <nstrgdfl:request-wrapper>
                          <nstrgdfl:APIRequest>
                

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!