Paradox Community

Items in pnews.paradox-development

Subject:Re: formatting
Date:Fri, 6 Apr 2018 17:11:19 -0400
From:"Steven Green" <greens@diamondsg.com>
Newsgroups:pnews.paradox-development
Mark.. no, useage.value is the same as the current format.. wow

Mike.. yes, in PdoxDOS, any math based on [useage] would of course be based 
on the actual field contents, regardless of the display format, unless you 
specifically format it or round it.. in PdoxWIN, I had assumed the same 
behavior, in the same context, all these years.. but I didn't use "format" 
like this guy did, in the form I'm working on, to squeeze a gazillion things 
on screen.. I would not have anticipated these results, because I would 
never round a number field that way, in a data entry process

it lets the user type in any number of decimal places, rounds to the 
"format" level for any action you take, but sticks what you typed into the 
field

type in .0025

with "w.3" display, any code uses .003 as the field value, then puts .0025 
into the field
with "w.2" display, any code uses .00 as the field value, then puts .0025 
into the field

if you type into a raw table, and not a form, you're just typing in .0025 
but there's no code attached, of course.. any queries or scans, after the 
fact, will use the real field values

geez, this is stupid !!

--

Steven Green
Myrtle Beach, South Carolina, USA

http://www.OasisTradingPost.com

Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
"Michael Kennedy"  wrote in message 
news:5ac7c63e$1@pnews.thedbcommunity.com...

On 06/04/2018 19:19, Steven Green wrote:
> Mark, I'll try what you said.. Mike, yes, making the display "w.4" solves 
> it
>
> problem is, that's supposed to be "display" formatting, not "field" 
> formatting.. never noticed this before.. something like this has HUGE 
> implications, in theory

If the calc is associated with the displayed value (W.2, W.4, ...), then
it might make sense?

   - Mike



> That sounds vaguely familiar.....  could actually be useful if it you
> knew about it and it was consistent.
> Have you tried the difference of:
>   usaage * tc.unitcost
> vs
>   usaage.value * tc.unitcost
> ?
> -- 
> Mark B
>
>
> On 4/6/2018 11:13 AM, Steven Green wrote:
>> I have a field called Useage.. no formatting or rules on the actual 
>> field, just a raw Number field that often has up to 4 decimal places
>>
>> on a form, I display it "w.2", but I can click on the field and see the 
>> actual value, if it's .025 or anything like that.. so far, normal 
>> behavior that I expected
>>
>> but when I use that field in a calc, it's using the formatted version of 
>> the field, not the real field.. in the example above, it showed me .03 on 
>> the form, of course.. I clicked on it and saw .025.. it did the resultant 
>> math with .03.. but I look at the table afterwards, it's .025
>>
>> useage * tc.unitcost
>>
>> in my example, tc.unitcost is 182.. times .025 is 4.55, times .03 is 
>> 5.46.. it's displaying 5.46
>>
>>
>> ??!?@@$??
>>
>>
>> -- 
>>
>> Steven Green
>> Myrtle Beach, South Carolina, USA
>>
>> http://www.OasisTradingPost.com
>>
>> Collectibles and Memorabilia
>> Vintage Lego Sets and Parts
>> - and Paradox support, too
> 


Copyright © 2004 thedbcommunity.com