Divide by zero error

Options
Duncy Dunc
Duncy Dunc Member
edited January 2023 in ? Working with APIs

Hey Xano'iens, I have a tricky tricky. My api is erroring when it has to divide by zero. Is there a way around this? My equation will need to divide by zero if the "get all records" count is zero. In my example below, var: signups = zero. Aka: There are no signups for their affiliate link yet.


Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    hey @Duncy Dunc - happy New Year. I don't have a slick trick for you but rather suggest you use a conditional (IF.. THEN.. ELSE..) statement to have that variable do something else or put another value in there if the var you are dividing by is 0