Forum Discussion

lillyknox's avatar
lillyknox
New Contributor
12 months ago

Hyperlink URL Error in HTML/XML Generator

I am working on a pipeline and have data being formatted as two separate HTML tables in an XML Generator Snap that is being mapped to an HTML Text Email Sender. I am attempting to format the hyperlink in one of the cells of the table to show the link as different text as opposed to the full URL. I am able to achieve the desired formatting but when the hyperlink is clicked, I am taken to a completely different link than the one I passed and get a "This site can't be reached" error.

I am passing the link as a parameter for the pipeline (when I copy and paste this link, I reach the website with no problem) :

 

Formatting the link in the XML Generator:

The link appears how I would like in the formatted email:

But this is the link I am taken to when I click the hyperlink or copy the URL and paste into any browser:

 

Any thoughts??

5 Replies

    • lillyknox's avatar
      lillyknox
      New Contributor

      Hello, I tried this and changed the XML to show the following and I got the desired "Test" but it was not linked. is there something else I need to do with the quotes in the XML since the quotes are there in the pipeline parameter?

      <a href = $item.Link_To_SF_CT_Record>Test</a>

       

      • aditya_gupta41's avatar
        aditya_gupta41
        Contributor

        Somehow, I am unable to upload my slp pipeline which have the solution, but here I am attaching the SS for your reference.

         

        <html>
            <body>
                    <a href="$item.Link_To_SF_CT_Record">Test</a>
            </body>
        </html>

         

         

         

         

  • Hello lillyknox,

    In order to access a Pipeline Parameter in the XML Generator Snap, you have to use the 

    ${_pipelineParamName}. Could you try with the following expression for the link?

     

    <a href="${_Link_To_SF_CT_Record}">TEST</a>

     

    Try this and let me know if this works for you.

    Regards,

    Aleksandar.

    • lillyknox's avatar
      lillyknox
      New Contributor

      Hello! Thank you for your response. This is what I tried. For the first one, I got the same issue with the link and for the second one, I was unable to get a link and instead returned [${Link_To_SF_CT_Record}]Test.

       

       

      <a href = "${item.Link_To_SF_CT_Record}">Test</a>
      
      <a href = "$item.{Link_To_SF_CT_Record}">Test</a>