cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pbrainard
Helper III
Helper III

Invalid operation: division by zero.

I'm getting this error when I open my app, and this just started like a week ago. 

Invalid operation: division by zero.

 

I don't see anything in the formulas section of the App Checker and I don't believe I have any formulas that do any division. This is stumping me.

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
pbrainard
Helper III
Helper III

For anyone else using Reza's Ticketing app, experiencing this issue, I was able to resolve it by changing the Template Width property of galtabs to:

If(CountRows(Self.AllItems) > 0,Parent.Width/CountRows(Self.AllItems))

 

View solution in original post

10 REPLIES 10
Nogueira1306
Super User
Super User

Do you have a divison somewhere i your app? Show us here

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

I do have some in formatting:

 

Template Size:
Parent.Width/CountRows(Self.AllItems)

If you insert that CountRows(Gallery.AllItens) in a label, does it give something?

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

I added this to the Text property of a label:

Parent.Width/CountRows(galTabs.AllItems)

The output was:  273.2

Set that in a var and set the width to that var

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Jose_Freitas
Super User
Super User

Hi, 

 

Most likely when you open the app, the countRows gets 0 rows since it hasn't loaded. 
I'll suggest creating a variable on OnStart, assign the value of 1 (to take the full width),  maybe once it loads set that variable to the item inside of the countRows and use that variable you created inside the count rows.

pbrainard_1-1643742091591.png

 

 

 

pbrainard
Helper III
Helper III

For anyone else using Reza's Ticketing app, experiencing this issue, I was able to resolve it by changing the Template Width property of galtabs to:

If(CountRows(Self.AllItems) > 0,Parent.Width/CountRows(Self.AllItems))

 

mariakrainova
New Member

I built Microsoft Crisis Comms power app (fromthe package) and end user side is not working, probably because I have the same message pop up? What do I do, please!

Invalid Operation: Division by Zero

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (5,805)