cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Formula for button outside of EditForm, URL and button text using values of SharePoint list

Hello,

I have a PowerApps form (EditForm) linked to a SharePoint list, 'Facts & Figures'.

The SharePoint list has two text columns, LinkText and LinkURL.

Each record's LinkURL goes to an external website (e.g., "http://cnn.com")

LinkText is the text displayed on the button (e.g., "CNN Web Site"). 

I can get the button to work okay if it's inside the EditForm, except in Internet Explorer, which is a job requirement.

OnSelect: If(!IsBlank(LinkURL), Launch(LinkURL))

Text: ThisItem.LinkText

DisplayMode: Edit

 

If I move the button outside the form and into a gallery, I get buttons for all the records in the list, which is undesirable.

If i move the button outside the form and NOT in a gallery, I get invalid errors, as LinkURL, LinkText, and ThisItem are no longer valid. I'm guessing it's because EditForm was where the DataSource is defined.

 

How do i refer to LinkURL and LinkText if the button is not in EditForm?

5 REPLIES 5
Dual Super User
Dual Super User

Re: Formula for button outside of EditForm, URL and button text using values of SharePoint list

Hi @Anonymous 

 

The reason that the LinkURL is not working outside the form is that you have not passed the reference correctly. Instead of passing the attribute, you should pass the control that is having the value for this LinkURL.
 
Assuming that Your Edit Form has a datacard for LinkURL and it has certain controls insode it. There is a value named control that you may want to refer on your outside form controls.
MicrosoftTeams-image (164).png
In the above picture, there is a sample TitleDataCard and its value can be accessed through DataCardValue4.Text
 
Now, suppose your URL control has a name DataCardValue5 and Text control has a name DataCardValue6, your expression will modify as:
OnSelect: If(!IsBlank(DataCardValue5.Text), Launch(DataCardValue5.Text))
 
Text: DataCardValue6.Text
 
DisplayMode: Edit
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
 
Anonymous
Not applicable

Re: Formula for button outside of EditForm, URL and button text using values of SharePoint list

Hi again, this fixed the errors in PowerApps. The button now works in Chrome and Edge, but Internet Explorer 11 is not working correctly.

  1. I click on the button.
  2. Explorer asks me if i want to allow popups
  3. I click 'allow once' or "always allow" (i've tried it both ways)
  4. The window refreshes but does not open the link.

I'm guessing this is an IE permissions problem, right? Is there any way around this? Would users need to change their local permissions or can i have my company's server people whitelist the PowerApps server?

Dual Super User
Dual Super User

Re: Formula for button outside of EditForm, URL and button text using values of SharePoint list

@Anonymous 

 

I carried out a similar test on my side and it opened the URL when the popup was allowed. There might be some IE specific issue, can you try to clear the cache and then confirm if the issue still exists? It would be better if you whitelist powerapps on your company servers.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Anonymous
Not applicable

Re: Formula for button outside of EditForm, URL and button text using values of SharePoint list

Hi, I've got significant progress (thanks!) but am still trying to figure out why the popup isn't working in IE 11, even when the popup blocker is turned off. Did you test it in IE 11? I've sent out a help ticket to the team that manages our servers and software installation... i suspect it's some security/permissions setting that goes beyond a simple popup blocker. 

Community Support Team
Community Support Team

Re: Formula for button outside of EditForm, URL and button text using values of SharePoint list

Hi @Anonymous 

 

You mean it works fine except IE11 Browser, and is the issue fixed now?

If not, you can also submit one ticket here:https://powerapps.microsoft.com/en-us/support/

 

Best Regards.

Yumia

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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