cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyint
Regular Visitor

unable to concat URL & Coordinates value as one URL

Hello,

 

I am building a flow where an adaptive card is posted on teams when a new record is created in SP list.

 

For this purpose I need to make a provision wherein a clickable link is embedded in the adaptive card, clicking on which will take the user to Google Maps with the coordinates as an input.

 

There are 2 parts of the concat expression:

1) This part of the URL: https://www.google.com/maps/search/

2) Coordinates fetched from SP list (xx.xxxxxxxx,xx.xxxxxxxx)

 

I want to concat these together but always there is space appearing:

https://www.google.com/maps/search
2x.5487xxxx,4x.xxxx8473

 This is rendering the link to work partially.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
cyint
Regular Visitor

So I was able to get it work.

There was a '/r' which I missed to escape, causing the coordinates to move to next line thereby causing the split in URL.

 

This is the code I used: 

uriComponentToString(replace(uriComponent(outputs('Compose_5')), '%0D', ''))

Now the URL is working as it should.

View solution in original post

2 REPLIES 2
PrasadAthalye
Community Champion
Community Champion

Can you use Compose and build expression like below? I am using Title field from SP List and Get Items action and that is why apply to each. You can use yours. If you are using just Get Item you don't need apply to each.

 

 

concat('https://www.google.com/maps/search/', items('Apply_to_each')?['Title'])

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
cyint
Regular Visitor

So I was able to get it work.

There was a '/r' which I missed to escape, causing the coordinates to move to next line thereby causing the split in URL.

 

This is the code I used: 

uriComponentToString(replace(uriComponent(outputs('Compose_5')), '%0D', ''))

Now the URL is working as it should.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,889)