web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formula for button out...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Screen Shot 2019-07-09 at 1.18.18 AM.png
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!
     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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?

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @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!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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. 

  • v-yuxima-msft Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard