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 / I want to disable the ...
Power Apps
Answered

I want to disable the SAVE button if it will found duplicate value into gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

RajSaha__0-1646831242246.png

in the above image Line 1 and 3  green field combination of two field ("Top Root Causes" & "Action Title" ) both line have same information in the green Color Field 
I want disable save button If user will found duplicate value 

If the green value same text value found I need disable Save button which is outside the gallery 

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

    Hi @Anonymous 

    Use this code under display property where you need to be Disabled 

    If(IsBlank(LookUp(galMain_1.AllItems,TrackingNumber=TextInput7.Text)),DisplayMode.Edit,DisplayMode.Disabled)

     

  • WarrenBelz Profile Picture
    154,941 Most Valuable Professional on at

    Hi @Anonymous ,
    Assuming the data is written to the fields

    If(
     CountRows(
     Filter(
     YourGalleryName.AllItems,
     'Top Root Causes' = 'Action Title'
     )
     ) > 0,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    If you are dealing with the content of the Combo Boxes before it is written to the data source

    If(
     CountRows(
     Filter(
     YourGalleryName.AllItems,
     YourTopRootCausesComboBox.Selected.xxxx = YourActionTitleComboBox.Selected.xxxx
     )
     ) > 0,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    where xxxx is the valid output (Value/Result/FieldName) of the combo box

     

    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.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz @Ramole Thanks to replying me .


    The above function is not working properly
    I will allow user enter unique value in the Action Title Green Color Field and I need to disable the Save Button Also 
    How to notify the user user need to put unique value 

    RajSaha__0-1648116635111.png

     

     

  • WarrenBelz Profile Picture
    154,941 Most Valuable Professional on at

    @Anonymous ,

    Please post (in text) the code that is not working for you now and where you are using it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    If(IsBlank(LookUp(galMain_1.AllItems,TrackingNumber=TextInput7.Text)),DisplayMode.Edit,DisplayMode.Disabled)

    If(IsBlank(LookUp('New & emerging risks and actionsGallery_12'.AllItems,UniqueColumn=TextInput10.Text)),DisplayMode.Edit,DisplayMode.Disabled)
    RajSaha__0-1648122472131.png

    Gallery "Action Title" field all are different but Save button is disable  

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    If(CountRows('New & emerging risks and actionsGallery_12'.AllItems) > CountRows(Distinct('New & emerging risks and actionsGallery_12'.AllItems, UniqueColumn)), Notify("This combination of values already exists. Please chose a different set of values",Error), Notify("Success", Success))

    RajSaha__0-1648138653032.png

    That above function is working 
    Thanks for your support 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard