cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shruthi
Frequent Visitor

Sharepoint List: Hyperlink using PowerApps form

I have one sharepoint list and have one field as hyperlink. I have customized this list using PowerApps. The hyperlink field is not taking the link in view form in shrepoint i.e., when i click the hyperlink field in view form, it should redirect to with respective url but it is not taking as a link in viewform but its working in editform. Could you please suggest me that how to configure (the link to open in view form) in PowerApps.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Shruthi,

 

Try this approach.

 

In your form, select the hyperlink field and unlock the datacard.

SelectField.PNG

 

Now add HTML text field to the selected data card and rename it something like 'hyperlink'. Set its properties like X,Y,Height and Width etc. similar to DataCardValue field.

AddLink.PNG 

 

Set below properties for new field-

 

Set "HTMLText" (Make sure to replace datacardvalue with correct value)

Concatenate("<a href='",DataCardValue3.Text,"'>",DataCardValue3.Text,"</a>")

 

Set "Visible" (Make sure to replace form name with correct value)

If(SharePointForm1.DisplayMode = DisplayMode.View,true,false)

 

Set "AutoHeight" to True

 

Set "Visible" property of DataCardValue to below code.

If(SharePointForm1.DisplayMode <> DisplayMode.View,true,false)

 

Save and publish your form. Now your View form will display link while Edit/New form will display textbox.

 

Hope this helps.

 

 

View solution in original post

4 REPLIES 4
v-yutliu-msft
Community Support
Community Support

Hi @Shruthi ,

Do you mean that after you customize form in PowerApps,you can not redirect to with respective url by clicking hyperlink field?

The reason why you met this problem is that in PowerApps,  hyperlink field will be added in textinput control by default.

Textinput control can only used to edit and display data, can not be seen as a link to click.

I suggest you use a launch button to redirect to with respective url.

What's more, if you add the button inside the form, when the form's mode becomes view, the button will become disabled too.

So I suggest you add the button outside the form to avoid the affect of form's mode.

 

I've made a similar test for your reference:

1)set the SharePointIntegration's OnView:

Navigate(FormScreen1);ViewForm(SharePointForm1)
//navigate to the screen, not just the form

2)insert a launch button outside the form

set the button's OnSelect:

Launch(DataCardValue8.Text)
//DataCardValue8 is the textinput name of the hyderlink field,
please replace it with your textinput control

10293.PNG

 

Then the button's mode will not be affected by the form's mode.

You could click the button to launch the link no matter in edit form or view form.

 

Best regards,

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

Hi @v-yutliu-msft 

 

I have used one button name as "Open" and i had set the button's OnSelect value as "Launch(DataCardValue1.Text)". This will work in edit mode not in view mode in SharePoint list. I need this hyperlink should work in view mode as well. Because for this list, we have given edit access for few users and other users have only read access. Read access users will be able to see the form and if they want to open the link in view form, they should open the link using button. 

I have attached the screenshots of edit mode and view mode.

 

Hi Shruthi,

 

Try this approach.

 

In your form, select the hyperlink field and unlock the datacard.

SelectField.PNG

 

Now add HTML text field to the selected data card and rename it something like 'hyperlink'. Set its properties like X,Y,Height and Width etc. similar to DataCardValue field.

AddLink.PNG 

 

Set below properties for new field-

 

Set "HTMLText" (Make sure to replace datacardvalue with correct value)

Concatenate("<a href='",DataCardValue3.Text,"'>",DataCardValue3.Text,"</a>")

 

Set "Visible" (Make sure to replace form name with correct value)

If(SharePointForm1.DisplayMode = DisplayMode.View,true,false)

 

Set "AutoHeight" to True

 

Set "Visible" property of DataCardValue to below code.

If(SharePointForm1.DisplayMode <> DisplayMode.View,true,false)

 

Save and publish your form. Now your View form will display link while Edit/New form will display textbox.

 

Hope this helps.

 

 

View solution in original post

Hi Danishlslam,

 

It works!. Thanks a lot.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (61,360)