cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KeeperTech-Ray
Regular Visitor

itemUrl has # instead of ? in url string

Hello Everyone!

 

I am creating a flow that allows me to select a file within a SharePoint Library and request approval from people. I am using the 'For a selected file' step to gather information about the file. Later, in my 'Create an approval' step I use the 'itemUrl' dynamic content as the 'Item Link'.

This results in the URL being:

https://company.sharepoint.com/sites/sitename/Shared%20Documents/Forms/AllItems.aspx#id=%2Fsites%2Fs...

 

Which contains a '#' at "AllItems.aspx#id=" which does not work as an legit URL. If I open the file manually through SharePoint the URL is exactly the same except that it contains a '?' at "AllItems.aspx?id=". 

 

Is this a bug, or is there something I can do to correct this? 

 

Thank you,

Ray

12 REPLIES 12
rimatos
Community Support
Community Support

Hi @KeeperTech-Ray ,

 

I just tested this on my side and confirm the behavior you mentioned in this thread, the URL contains a '#' instead of a '?'.

What happens when you click in this URL? Does it open the file or simply leaves a blank page?

As for a workaround you could try to use the replace function from Power Automate to change the URL, such as the following:

replace(triggerBody()?['entity']?['itemUrl'],'#','?')
image.png
 
Let me know if this helped!
 
Regards,
Ricardo

Thank you, @rimatos 

 

The workaround doesn't appear to be working for me. In fact, looking at the testing output, it appears that I have a ? as the input... Maybe the bug is in another step? I moved the replace function around in my flow and it never had an effect. Could it be my adaptive card or posting it to Teams? 

Clicking the link with a '#' in it, presents me a blank white page. 

 

I don't seem to have permission to upload images, or I would show you my input/output from testing. 

 

Thank you,

Ray

Hi @KeeperTech-Ray ,

 

Yes, if possible please show me a screenshot of the configuration of your Flow and how you implemented the workaround.

Also show me how the output/input appears in the actions after the flow runs.

 

Regards,

Ricardo

@rimatos when I first tried to add attachments I was told I didn't have permission. But, it's working this morning. I have attached an overview of my entire flow and the results of the replace during a test. Flow.jpgTest in out.jpg

HI @KeeperTech-Ray ,

 

Thank you for coming back to us!

Taking a look at the output in the Compose action the replace function appears to have worked. Are you able to properly select the hyperlink with this suggested modification?

 

Regards,

Ricardo

HI @rimatos , 

 

I can not. The link shown in my adaptive card in Teams and in the link sent via email, still have a '#' and only show a blank page. 

 

Thank you,
Ray 

 

Could you show what dynamic content are you using in the Teams adaptive card?

Make sure that you are using the output from the compose action after the replace function was executed.

@rimatos ,

 

I think you are asking to see this. 

 

KeeperTech-Ray_0-1599080125613.png

 

Hi @KeeperTech-Ray ,

 

In the Teams adaptive card instead of putting the dynamic content directly from the SharePoint trigger as you did:

rimatos_1-1599144865225.png

 

 

Try to use the output of the Compose action with the function that I've provided:


Regards,
image.png

 

Regards,

Ricardo

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,955)