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 / Show Button only in di...
Power Apps
Answered

Show Button only in display form

(0) ShareShare
ReportReport
Posted on by 135

Hello Everyone,

I have Customized PowerApps form for my SharePoint list and i have add a button to an hyperlink column and would like to make the button visible only in display form. 

Here is what i have on the button displaymode and the button is visible in both edit and display form,  
Visible = If(SharePointForm1.Mode=1,false,true)

And i would like this button to be visible only when it contains value. 

Any suggestions on how to configure this.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Jean_9681 

    Please consider changing your Visible Property Formula to the following:  SharePointForm1.Mode = FormMode.Display

    You don't need the If and true false stuff, this formula will return true or false already.

     

    You then say "And i would like this button to be visible only when it contains value." - I am not sure what you are referring to on this.

     

    I hope this is helpful for you.

  • Jean_9681 Profile Picture
    135 on at

    @RandyHayes Thank you so much for sharing the formula, unfortunately its not working not sure if i am doing it right.

    1. When i try this formula the button is not visible in display mode

    Jean_9681_0-1614697757819.png


    2. "And i would like this button to be visible only when it contains value."
    Its an hyperlink column and does not have a link/value added to it all time, i want the button to be visible only when the hyperlink column has a value/link added, if blank the button should not be visible. 

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Jean_9681 

    Sorry, my bad...I meant :  SharePointForm1.Mode = FormMode.View

     

    Now, with the other factor, your Visible property would be based on the column value not being blank:

     SharePointForm1.Mode = FormMode.View && !IsBlank(ThisItem.yourHyperlinkColumnName)

     

  • Jean_9681 Profile Picture
    135 on at

    @RandyHayes  - This works,   SharePointForm1.Mode = FormMode.View 

    but it ended up with another problem now, The button is a pain text now and its not clickable anymore..

    For the button -OnSelect - i have this Launch(DataCardValue5.Text)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Jean_9681 

    This property change will not impact what you are saying is now the case.  
    Are you stating that if you remove the formula we just put in and replace it with true, that the button works properly?

     

  • Jean_9681 Profile Picture
    135 on at

    Yes, the button is clickable with this formula If(SharePointForm1.Mode=1,false,true)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Jean_9681 

    I'm not completely following what is going on.  Your button is either visible or not based on the Visible property.  This does NOT impact click-ability, only Visibility. 

    So, what is the DisplayMode property of your button?  This determines click-ability.

  • Jean_9681 Profile Picture
    135 on at

    This is what i have for the DisplayMode property for this button
    DisplayMode = Edit 

    More info

    This is what i have done so far

    1. Created an hyperlink column in SharePoint list
    2. In PowerApps -
    2.1- Changed the visible for hyperlinkdatacard to false
    2.2 Under Hyperlink datacard > Created an HtmlText
    and added this formula
    Concatenate("<a href='",DataCardValue.Text,"'>",DataCardValue.Text,"</a>")
    2.3 > Turned of the visible for this HtmlText
    3.Created a Button outside SharePointForm1
    And changed the property's of this button
    OnSelect - Launch(DataCardValue.Text)
    Visible - If(frmChangeForm.Mode=1,false,true)

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Jean_9681 

    To be clear...is that the actual formula in the DisplayMode property?  (DisplayMode = Edit) or is it just Edit?

    Can you provide a screenshot of what you are seeing?

     

  • Jean_9681 Profile Picture
    135 on at

    It's just Edit 

    Jean_9681_1-1614718435864.png

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard