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 / Set Validation on not ...
Power Apps
Answered

Set Validation on not selected item from gallery

(0) ShareShare
ReportReport
Posted on by 522

I would like to set up validation on Edit icon based on gallery1, If item is not selected on gallery and select edit. I need display message saying "Select item from gallery" and not navigate screen without selection of the item in the gallery

Categories:
  • Verified answer
    alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hello,

     

    Lets say your gallery is named Gal1 and your edit button is name icoEdit so on the onselect property of icoEdit you put
    if(IsBlankOrError(Gal1.Selected),Notify("Please select"),Navigate(screenedit))

     

    Best regards,

    Alaa

  • Nikhil2 Profile Picture
    522 on at

    Found solution from above suggestion, Thank you !

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Nikhil2 ,

     

    If you change your formula a lit bit it might help you. 

    If(IsBlank(Gal1.Selected.ID),Notify("Please select"),EditForm(Form);Navigate('Status (Form)'))

     

     

  • Nikhil2 Profile Picture
    522 on at

    Thank you ! I have modified in a same way. But i have one more question I have edit Icon OnSelect i navigate and can edit the Form(screen2) but i would like to hide editIcon when there is no columnchart(screen1)

     

    Yellow highlighted is the place where edit icon placed, even though chart is visible i cannot see edit icon because visible property is set to If(!IsBlankorError(ColumnChart),true,false).

    Onselect: EditIcon 

     

     

     

    If(IsBlankOrError(ColumnChart1_7), EditForm(Form);Navigate('Status'))

     

     

    Nikhil2_0-1658405574186.png

     

     

     

  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    sur so what you can do is is set the visible porperty of that editicon. But what do you mean by columnchart(screen1) ?

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Nikhil2 

     

    Due you mean when same columnchart variable is blank you want to directly hide the edit icon ?  If so you can try below code 

    Edit icon : Visiblity: If(IsBlankOrError(ColumnChart1_7),false,true)

     

     

     

     

  • Nikhil2 Profile Picture
    522 on at

    Basically When Chart(Project1 data source) is visible from above image, i need to show edit icon which navigates to edit form else i need to validate the edit icon to saying create chart to edit.

  • Verified answer
    Nikhil2 Profile Picture
    522 on at

    Found Solution to this.

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard