Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calc "bug", FMP4 /Win98

1 view
Skip to first unread message

Christoph Bouthillier

unread,
Mar 18, 2002, 8:00:49 AM3/18/02
to
Dear Listeners:

I have found a peculiar bug, or is it only a peculiarity? Imagine a calc,
result = text:

Case(
relation_name::s.max.running.date - Status(CurrentDate) <=0;
"";

relation_name::s.max.running.date - Status(CurrentDate) =1;
"= " & relation_name::s.max.running.date - Status(CurrentDate) & " day to
go";

relation_name::s.max.running.date - Status(CurrentDate) >1;
"= " & relation_name::s.max.running.date - Status(CurrentDate) & " days to
go"
)

The "=" sign will not show, i.e. the result
will look like e.g.
"24 days to go"
and not
"= 24 days to go"

I tried to replace the "= " by a text-global containing an equal sign, but
alas, to no avail.

When I replace the related part by e.g. a fixed number, things work fine
again.
When you replace the equal sign by a "(", your get a VERY strange
calculation result:

"-1461878 days to go"

Then I thought of adding brackets around the date calculation:

... (relation_name::s.max.running.date - Status(CurrentDate))...

and things work fine again.

Is this a bug or had you expected such behaviour here?

???

--


Met vriendelijke groet / Mit freundlichen Gruessen / With kind regards
Christoph Bouthillier
post (at) no-no-spamtekstotaal.com
Please remove "no-no-spam" when E-mailing me directly - Thanks
------


John Weinshel

unread,
Mar 18, 2002, 12:33:01 PM3/18/02
to
Christoph,

Try wrapping the offending code in NumToText():

Case(
relation_name::s.max.running.date - Status(CurrentDate) <=0,
"",

relation_name::s.max.running.date - Status(CurrentDate) =1,
"=" & NumToText( relation_name::s.max.running.date - Status(CurrentDate) ) &
" day to
go",
relation_name::s.max.running.date - Status(CurrentDate) >1,
"= " & NumToText( relation_name::s.max.running.date - Status(CurrentDate) )


& " days to
go"
)

John


"Christoph Bouthillier" <po...@tekstotaal.com> wrote in message
news:a74p2p$19a$1...@news1.xs4all.nl...

Howard Schlossberg

unread,
Mar 18, 2002, 12:42:36 PM3/18/02
to
Somehow, it seems FMP is interpreting the equal sign as part of the
number that follows. Try turning the math into text. In other words:

Case(
relation_name::s.max.running.date - Status(CurrentDate) <=0;
"";

relation_name::s.max.running.date - Status(CurrentDate) =1;

"= " & numtotext(relation_name::s.max.running.date -
Status(CurrentDate)) & " day to go";



relation_name::s.max.running.date - Status(CurrentDate) >1;

"= " & numtotext(relation_name::s.max.running.date -
Status(CurrentDate)) & " days to go"
)

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 321-5176
FM Pro Solutions Los Angeles, California
Associate Member, FileMaker Solutions Alliance

0 new messages