cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nikhil2
Post Patron
Post Patron

Set Validation on not selected item from gallery

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
alaabitar
Solution Specialist
Solution Specialist

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

View solution in original post

Nikhil2
Post Patron
Post Patron

Found Solution to this.

View solution in original post

8 REPLIES 8
alaabitar
Solution Specialist
Solution Specialist

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

Found solution from above suggestion, Thank you !

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)'))

 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

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
Solution Specialist
Solution Specialist

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

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)

 

 

 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

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.

Nikhil2
Post Patron
Post Patron

Found Solution to this.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,313)