Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've been really stuck with this problem, the DefaultValue field returns the correct value (1.5) if no division is done but returns null if I divide by 24.0 (or any number). If I enter 1.5/24.0 in its place it also returns the correct value, so I'm not at all sure whats going on. Any help would be much appreciated.
Here is the line from the script (just for clarity, the problem only occurs for rows that contain 'hrs' and make the if return true):
if(WildMatch(Description, '*hrs*'),DefaultValue/24.0,DefaultValue) as Target
Please let me know if you need more information, thank you.
Hi,
Well, most likely your DefaultValue is just a text, try explicitly to convert it to numeric with num#(DefaultValue) function.
If the number has certain format, specify it like NUM#(DefaultValue,'#,###.00')...
You can quickly understand if it's a text or number by looking at it in table viewer (preview): if it's aligned to the right = number, to the left = text.
Hope this helps.
//Andrei
Hi,
Well, most likely your DefaultValue is just a text, try explicitly to convert it to numeric with num#(DefaultValue) function.
If the number has certain format, specify it like NUM#(DefaultValue,'#,###.00')...
You can quickly understand if it's a text or number by looking at it in table viewer (preview): if it's aligned to the right = number, to the left = text.
Hope this helps.
//Andrei
Hi Andrei,
That worked perfectly, thank you so much! Never even though of that.
Check your system variables
SET ThousandSep=',';
SET DecimalSep='.';
I suspect your DefaultValue has different to your settings...
//Andrei
I did try that earlier but it didn't seem to work for whatever reason. But with the num#() I can be sure it works.
Thank you!