cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Link to SharePoint Item from PowerApps

I have a PowerApps app from a SharePoint custom list called "Transaction Requests", and one of the fields is a text field that has a URL in it that Flow inserts that corresponds to an original form from a separate SharePoint form library.  The idea is managers visiting the Transaction Requests app (backend: SharePoint custom list) can click the URL to open the corresponding form from the forms library, but I cannot get it to work.  

 

The URL appears as text but I can't make it launch using the On Select: Launch() function.  I've even tried to add a button with OnSelect: Launch().  Both OnSelect: Launch() functions I've tried with "Parent.Default" in the parenthesis, as well as "ThisItem.'Link to Item'" and although both options show the URL in the text box, the actual function of clicking either does nothing.

 

See images for OnSelect properties of each

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Link to SharePoint Item from PowerApps

Hi @staceylaney ,

Based on the screenshot that you mentioned, I agree with @KrishnaV 's thought almost.

 

If you add the button inside the "Link to Request" data card of your Display form, I think the Launch function could not work in your app, and the button is not clickable.

 

It is an normal behavior in PowerApps canvas app Display form -- when you add a button inside a data card of a Display form, the Button would not be clickable. The DisplayMode property of the Display form would override that of its child elements (controls), even though, you set the DisplayMode property of the Button to DisplayMode.Edit.

 

As an fixed solution, I think the "Html Text" control could achieve your needs. Please consider unlock the "Link to ROC CAPEX Request" data card in your Display Form, then remove the Original Label from there, instead, add a "Html Text" control inside it:

15.JPG

Set the Html Text property of the Html Text control to following:

"<a href='"& ThisItem.'Link to item'   &"' style='color:red;'>Link to Item</a>"

then you could click the Link from your Display form.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Champion
Community Champion

Re: Link to SharePoint Item from PowerApps

Hi @staceylaney ,

You have the launch code on the label instead of the button and the one on the button will do nothing. On the button you need (change to your actual control name)

Launch(YourLabelName.Text)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Link to SharePoint Item from PowerApps

Hi @staceylaney ,

 

I can see that you trying to achieve on click in view form. Unfortunately, we can't achieve this Launch this URL unless you add the form as edit and make all the other controls on the form display mode to view.

 

I have seen this issue several times with my clients but unfortunately we can't perform onSelect in view form.

 

let me know if you need any help on this I have a thorough understanding of this as I have done many times.

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

Highlighted
Community Support
Community Support

Re: Link to SharePoint Item from PowerApps

Hi @staceylaney ,

Based on the screenshot that you mentioned, I agree with @KrishnaV 's thought almost.

 

If you add the button inside the "Link to Request" data card of your Display form, I think the Launch function could not work in your app, and the button is not clickable.

 

It is an normal behavior in PowerApps canvas app Display form -- when you add a button inside a data card of a Display form, the Button would not be clickable. The DisplayMode property of the Display form would override that of its child elements (controls), even though, you set the DisplayMode property of the Button to DisplayMode.Edit.

 

As an fixed solution, I think the "Html Text" control could achieve your needs. Please consider unlock the "Link to ROC CAPEX Request" data card in your Display Form, then remove the Original Label from there, instead, add a "Html Text" control inside it:

15.JPG

Set the Html Text property of the Html Text control to following:

"<a href='"& ThisItem.'Link to item'   &"' style='color:red;'>Link to Item</a>"

then you could click the Link from your Display form.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Link to SharePoint Item from PowerApps

@v-xida-msftthe htmltext function works perfectly!  What I did, though, is instead of adding "ThisItem" is added the text of the datacardvalue7 textbox that has the link to the form library item, and it worked beautifully!

 

Thanks so much!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,502)