cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MH3
Post Prodigy
Post Prodigy

Hiding and Showing PopUp

Hi,
I want to hide and show the Popup

by typing in a input box and which that matches with the DataSource column, if it matches then show the result on Form and if it does not match then show the PopUp (No Record Found). But I am unable to do that

 

ScreenOnVisible
UpdateContext({InfoPopup: false});


PopUp( all Controls)
All Controls OnVisible = InfoPopup variable

 

after Entering text into InputBox and Pressing the button
Button
OnSelect 

UpdateContext({recordCount: CountIf(SystemDisposal, SeviceTagNumber = ServiceTagInput_1.Text)});

If(recordCount > 0, UpdateContext({InfoPopup: true}),UpdateContext({InfoPopup: false}))

 

it works if there is a record the form displays it but if there is no record it should show the Popup

 

@RandyHayes  @WarrenBelz 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Akser
Solution Supplier
Solution Supplier

CountIf will be empty since there is no record (if I'm not mistaken). How about you use the CountRows instead? 

 

UpdateContext({recordCount: CountRows(Filter(SystemDisposal, SeviceTagNumber = ServiceTagInput_1.Text))});

If(recordCount > 0, UpdateContext({InfoPopup: true}),UpdateContext({InfoPopup: false}))

View solution in original post

6 REPLIES 6
SanshubhLubal
Resolver I
Resolver I

Write this code on Visible Property of PoP up Box

 

If(IsEmpty(Gallery1.AllItems),true,false)

Akser
Solution Supplier
Solution Supplier

CountIf will be empty since there is no record (if I'm not mistaken). How about you use the CountRows instead? 

 

UpdateContext({recordCount: CountRows(Filter(SystemDisposal, SeviceTagNumber = ServiceTagInput_1.Text))});

If(recordCount > 0, UpdateContext({InfoPopup: true}),UpdateContext({InfoPopup: false}))

@SanshubhLubal 

There is no gallery, I am going through a button to a new screen and then there is a From (Edit) and an InputText Box in which I enter some text and it will have to match it with the Datasource and then if it exists then it will show up on the form.. and if not exists then it should show the error and also when the textbox is empty it should show blank screen.

@SanshubhLubal 

There is no gallery, I am going through a button to a new screen and then there is a From (Edit) and an InputText Box in which I enter some text and it will have to match it with the Datasource and then if it exists then it will show up on the form.. and if not exists then it should show the error and also when the textbox is empty it should show blank screen.

If(IsEmpty(Filter(SystemDisposal, SeviceTagNumber = ServiceTagInput_1.Text)),true,false)

MH3
Post Prodigy
Post Prodigy

 Hi, 

@SanshubhLubal  @Akser 

Thanks for your answers and I have used CountRows and that helped me on my problem.

Kudos to both !!!

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 (2,748)