FlowHeater Logo

FlowHeater Support Forum

simply more productive

Download the freeware version (10 Mb)

Up to 100,000 records can be processed with the freeware version!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Division function [Number divided by Zero]

Division function [Number divided by Zero] 2 years 9 months ago #2358

  • Andrew Wojciak
  • Andrew Wojciak's Avatar Topic Author
  • Offline
  • Posts: 21
I am using a Division and this function is not calculating divisions by Zero correctly. For example: 10 / 0 = 10 (but should be "#DIV/O!" or something like this). Is it possible to have "#DIV/O!" when a number is divided by zero?
AW

Please Log in or Create an account to join the conversation.

Division function [Number divided by Zero] 2 years 9 months ago #2359

Hi Andrew,

Thanks for the suggestion. I’ve added this feature in a first Beta of Version 3.5.3. You can download and use this Version here: Download FlowHeaterBeta

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Division function [Number divided by Zero] 2 years 9 months ago #2360

  • Andrew Wojciak
  • Andrew Wojciak's Avatar Topic Author
  • Offline
  • Posts: 21
I have updated to Beta Ver 3.5.3. but Division is showing the same issue. I have checked formating and I am dividing Integer/Integer = Decimal so should be fine. Any suggestions?
Thanks
AW

Please Log in or Create an account to join the conversation.

Division function [Number divided by Zero] 2 years 9 months ago #2361

I’ve attached the Definition which I have tried it and I get the result in the screenshot. Could you please try it also with this definition? If the result also the same please be sure that you’re using the right BETA version.


File Attachment:

File Name: division-by-zero.fhd
File Size: 5 KB



Attachments:

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Division function [Number divided by Zero] 2 years 9 months ago #2362

  • Andrew Wojciak
  • Andrew Wojciak's Avatar Topic Author
  • Offline
  • Posts: 21
Hi Robert,
your division-by-zero.fhd file produces correct results in my FH too, but here is what I have noticed in my process which still does not produce correct results: 1/ All together I have 4 steps (.fhd-s) in my process 2/ in my step# 3 I am updating SQLite but some fields used in the next step as denominator remains NULL (that's OK - no data to populate) 3/ when I run my final step4 (.fhd with Division) warnings are produced: "The values (null) could not be converted into a number". So it seems Division is not working correctly when denominator is NULL.
Can you help?
Thank you.
AW

Please Log in or Create an account to join the conversation.

Division function [Number divided by Zero] 2 years 9 months ago #2363

Hi Andrew,

You need a short IF-THEN-ELSE condition the set the certain field in case of DBNULL (or isn’t a NUMBER) to zero. Please find attached a short example.

File Attachment:

File Name: isnumber-if-then-else-condition.fhd
File Size: 8 KB
Attachments:

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
  • Page:
  • 1
Time to create page: 0.286 seconds