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
Super User
Super User

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,104)