f



How to convert Number Field to Text Field

I'm newbie in Filemaker, currently I'm using Filemaker pro v 6.01 on
Windows XP. I have a small problem. I'm trying to make a solution for
Hotel Rate. I want to change the USD. 0.00 to "Included" for breakfast
rate which already included in the room rate.

Anybody can help, will be much appreciated.

Thanks.
0
priyadi77
4/8/2004 12:46:25 PM
comp.databases.filemaker 11053 articles. 0 followers. amosw01 (46) is leader. Post Follow

5 Replies
1557 Views

Similar Articles

[PageSpeed] 57

"Adhie" <priyadi77@yahoo.com> wrote in message
news:ba1b5c27.0404080446.21e110b2@posting.google.com...
> I'm newbie in Filemaker, currently I'm using Filemaker pro v 6.01 on
> Windows XP. I have a small problem. I'm trying to make a solution for
> Hotel Rate. I want to change the USD. 0.00 to "Included" for breakfast
> rate which already included in the room rate.
>
> Anybody can help, will be much appreciated.
>
> Thanks.

You didn't say what the problem is.  What results do you want?  What have
you tried?  What happened when you tried it?


0
Glenn
4/8/2004 1:27:26 PM
in article ba1b5c27.0404080446.21e110b2@posting.google.com, Adhie at
priyadi77@yahoo.com wrote on 4/8/04 8:46 AM:

> I'm newbie in Filemaker, currently I'm using Filemaker pro v 6.01 on
> Windows XP. I have a small problem. I'm trying to make a solution for
> Hotel Rate. I want to change the USD. 0.00 to "Included" for breakfast
> rate which already included in the room rate.
> 
> Anybody can help, will be much appreciated.
> 
> Thanks.

If I understand correctly, you presently show an amount of $0.00 as the
charge for breakfast, and you would rather that it say "Included" instead.
Probably on a receipt you print for the visitor?

One way:

Open your field definitions and change the field from Number to Text. In
options, set the field to Auto-enter "Included".

Back at your layout, do a Replace Contents in that field to replace the 0
with "Included".

Another way:

Just remove the field from the layout and put the word "Included" in its
place.  That way you have the option of charging for breakfast at some point
in the future without having to undo everything you did in the first
example.

Matt




0
Matt
4/8/2004 6:28:07 PM
Hi Matt,

Thanks for help, that's actually what I mean. 

Previously, I set my field to Number instead of Text as I still want
to display the breakfast charge for Rate which the breakfast is not
included in the room rate.

The problems are like this: 
I have two rates for Room and Breakfast.

1. Breakfast already included in the room rate.
   I want to display "Included" instead of $. 0.00

2. Breakfast NOT included in the room rate
   For the breakfast which is not included in the room rate, I still
need to display it in the receipt for the breakfast charge / the
amount with the Currency leading.

I want to do those two in the same field rather than to set two
different fields for Breakfast which is "Included" and charged (to
show the amount in $).

Is it possible? 

I set validation for the number field as follow:
If(Breakfast = "", "" , "Included" )

I used "" to represent 0 or blank. But the word "Included" did not
display when in Browse mode. I think due to the field is Number field
so the word "Included" did not show up.

Any suggestion? Thanks a lot for help.

Regards,
Adhie
0
priyadi77
4/11/2004 5:00:09 AM
You could put a text field on top of the numerical field. Set the 
numerical field to show "" (nothing) if breakfast is included, and 
otherwise show the dollar amount. Set the text field to show "Included" 
if breakfast is included, and "" (nothing) if it isn't. That way, only 
one of the fields has a shown value at any given time.

Does that make sense?

--Lisa

In article <ba1b5c27.0404102100.10f83f2c@posting.google.com>,
 priyadi77@yahoo.com (Adhie) wrote:

> Hi Matt,
> 
> Thanks for help, that's actually what I mean. 
> 
> Previously, I set my field to Number instead of Text as I still want
> to display the breakfast charge for Rate which the breakfast is not
> included in the room rate.
> 
> The problems are like this: 
> I have two rates for Room and Breakfast.
> 
> 1. Breakfast already included in the room rate.
>    I want to display "Included" instead of $. 0.00
> 
> 2. Breakfast NOT included in the room rate
>    For the breakfast which is not included in the room rate, I still
> need to display it in the receipt for the breakfast charge / the
> amount with the Currency leading.
> 
> I want to do those two in the same field rather than to set two
> different fields for Breakfast which is "Included" and charged (to
> show the amount in $).
> 
> Is it possible? 
> 
> I set validation for the number field as follow:
> If(Breakfast = "", "" , "Included" )
> 
> I used "" to represent 0 or blank. But the word "Included" did not
> display when in Browse mode. I think due to the field is Number field
> so the word "Included" did not show up.
> 
> Any suggestion? Thanks a lot for help.
> 
> Regards,
> Adhie
0
Lisa
4/13/2004 4:49:33 PM
I'd have two fields for the purpose, but not layered on the layout that 
I use to report a receipt. Instead, one field -- a number field -- that 
"works"; another field -- which returns text -- that is calculated from 
the working field, for show to the customer. The calculation would 
simply pass on the number value if nonzero, and set the result to 
"Included" if zero. 

I'm not sure if I'm beating this point to death, but FM is not strongly 
typed; type conversion is effortless. You can put numbers in text fields 
and text in number fields. If you create a Calculation field, set the 
type of the result to text, and just stick a number field in the 
calculation area, you've made an explicit type conversion. 

This is my general strategy when it's more convenient for me to see or 
work with data in one form, while I want to display the same data in 
another. Sometimes I can use the same field in the database, only 
formatting it differently in different layouts; otherwise, I just create 
a calculated field, and in the calculation I "manage" the output format.

-- 
Xiong

"Saruman, your staff is broken."
0
Xiong
4/14/2004 5:34:59 AM
Reply: