- Posts: 21
Division function [Number divided by Zero]
- Andrew Wojciak
- Topic Author
- Offline
- User
Less
More
9 years 10 months ago #2358
by Andrew Wojciak
Division function [Number divided by Zero] - Post(2358) was created by Andrew Wojciak
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
AW
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
9 years 10 months ago #2359
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Division function [Number divided by Zero] - Post(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
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
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- Andrew Wojciak
- Topic Author
- Offline
- User
Less
More
- Posts: 21
9 years 10 months ago #2360
by Andrew Wojciak
Replied by Andrew Wojciak on topic Division function [Number divided by Zero] - Post(2360)
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
Thanks
AW
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
9 years 10 months ago #2361
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Division function [Number divided by Zero] - Post(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.
Best wishes
Robert Stark
Attachments:
Please Log in or Create an account to join the conversation.
- Andrew Wojciak
- Topic Author
- Offline
- User
Less
More
- Posts: 21
9 years 10 months ago #2362
by Andrew Wojciak
Replied by Andrew Wojciak on topic Division function [Number divided by Zero] - Post(2362)
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
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.
- FlowHeater-Team
- Offline
- Admin
9 years 10 months ago #2363
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Division function [Number divided by Zero] - Post(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.
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.
Best wishes
Robert Stark
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.286 seconds