AnsweredAssumed Answered

Result of SQL Select Query seems to be inputting a Carriage Return

Question asked by rfranklin15 on Jul 27, 2018
Latest reply on Jul 30, 2018 by Sjaak Overgaauw

I've got a weird issue happening and I'm not entirely sure why. Hoping someone can point me in the right direction.

I'm making a REST call using an HTTP connector and I am injecting variables into the connector with a Set Properties shape.

 

Process overview

 

One of those variables is an Authorization Token that resets every 24 hours. I have a different process that extracts that Token and stores it in SQL so that all of my other processes can access the Token and assign it to a variable in the Set Properties shape.

 

I'm creating the variable as a Dynamic Document Property using a simple SQL statement:

 

SELECT Token FROM AuthToken

 

Simple, right? And I just string that Dynamic Property along with the others into the Resource Path of the HTTP connector.

 

Resource Path screenshot

 

But for some reason the SQL query to get that AuthToken seems to be putting a Carriage Return in it which screws up my resource path and I get an error about an "Illegal Character" in my URL. To troubleshoot the issue, I removed the HTTP connector shape and am just emailing myself what would be the Resource Path.

 

Process overview

With the Body of the email set to include all of my Dynamic Document properties and the necessary Static values that go between them.

 

Email properties

 

And this is the result (the AuthToken is bolded):

 

1237355455&auth=b263ed59-00e2-497b-8607-50e426369200

&DriverTimeZone=PST&Start=2018-07-26&End=2018-07-27

 

There's a new line being created after the AuthToken property.

 

For testing purposes, I made the AuthToken static. I copied it from SQL and pasted it in the Dynamic Document property as Static. And this is the result:

 

1237355455&auth=b263ed59-00e2-497b-8607-50e426369200&DriverTimeZone=PST&Start=2018-07-26&End=2018-07-27

 

I try plugging this string of variables into my HTTP Connector and everything works. No illegal character message and I get the information I need.

 

So what's causing the problem and how do I get around it?

 

Thanks.

Outcomes