Encoding a single variable to UTF-8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2017 09:55 AM
Hi, I am trying to encode a single variable in the middle of a string that is part of an outbound HTTP Post request. The value field should accept a regular string and then encode the string to UTF-8 before sending out. Any ideas? I'm new to Service Now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 06:05 AM
Hi John,
Can you explain your detailed requirement?
I think you are consuming some endpoint either SOAP or REST based and have question in that.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 06:26 AM
Hi Ankur,
Thank you for replying. My company uploaded a bunch of locations via an excel file to the cmd_location table, however, they are only addresses and do not have latitude and longitude with them. My end goal is to have a business rule or something that will run once a day, and if the latitude and longitude fields are empty on the location in the locations table list, then it will grab the address from the address field make an HTTP request to Google Maps API which will return a JSON object containing all the information for that location. At that point, I will grab the lat and lng and update the location entry filling in the two empty latitude and longitude fields.
I created an outbound HTTP request, but was having an issue because the address needs to be sent in UTF-8 encoding. I was able to find out that, when you pass a string off the base URL via a parameter, it encodes it for you, so I now have a variable that is being sent in UTF-8 encoding. I no longer need to know how to do encode that variable which was my original question. But if you know how, can you tell me how to access the custom Outbound REST Request I made and pass and address off to that variable via a business rule on the location table?
Thank you,
Jesse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2019 11:04 PM
Hi Jesse,
Where you able to solve the issue?
Regards
Gautham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2020 12:30 AM