knowledge-database (beta)

Current group: dbase.getting-started

Calculated field

Calculated field  
sylvia
 Re: Calculated field  
Malcolm Brown
 Re: Calculated field  
Ken Mayer [dBVIPS]
 Re: Calculated field  
sylvia
 Re: Calculated field  
Ken Mayer [dBVIPS]
 Re: Calculated field  
sylvia
 Re: Calculated field  
sylvia
 Re: Calculated field  
Geoff Wass
 Re: Calculated field  
sylvia
 Re: Calculated field  
Geoff Wass
 Re: Calculated field  
Roland Wingerter
From:sylvia
Subject:Calculated field
Date:Mon, 27 Dec 2004 15:35:53 -0500
hi im trying to make a calculated field on my form, is very simple i just want make a addition on the form with 2 fields and show it on the form
but how can i do this?
sylvia
From:Malcolm Brown
Subject:Re: Calculated field
Date:Mon, 27 Dec 2004 20:51:55 +0000
sylvia wrote:

> hi im trying to make a calculated field on my form, is very simple i just
> want make a addition on the form with 2 fields and show it on the form
> but how can i do this? sylvia

There is quite a lot of information about this in the knowledgebase using
fields within the same table and a further amount (prompted by me) about
calculations on fields from diferent tables.

See also news.dbasetalk.com

Malcolm Brown
From:Ken Mayer [dBVIPS]
Subject:Re: Calculated field
Date:Mon, 27 Dec 2004 15:31:31 -0800
sylvia wrote:
> hi im trying to make a calculated field on my form, is very simple i just want make a addition on the form with 2 fields and show it on the form
> but how can i do this?
> sylvia

In addition to Malcolm's advice (and it is a good idea to check the
Knowledgebase for a lot of things), basically you need to look at the
field object -- create a new field for your table -- but this is a
calculated field, and not really part of the table. There's an example
in the online help, as well as in the Knowledgebase. (Look at the stuff
on OODML in there ...)

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:sylvia
Subject:Re: Calculated field
Date:Tue, 28 Dec 2004 14:21:37 -0500
i cant find the information on the on line Knowledgebase
about this topic and plus the serch engine dont work


Ken Mayer [dBVIPS] Wrote:

> sylvia wrote:
> > hi im trying to make a calculated field on my form, is very simple i just want make a addition on the form with 2 fields and show it on the form
> > but how can i do this?
> > sylvia
>
> In addition to Malcolm's advice (and it is a good idea to check the
> Knowledgebase for a lot of things), basically you need to look at the
> field object -- create a new field for your table -- but this is a
> calculated field, and not really part of the table. There's an example
> in the online help, as well as in the Knowledgebase. (Look at the stuff
> on OODML in there ...)
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
From:Ken Mayer [dBVIPS]
Subject:Re: Calculated field
Date:Tue, 28 Dec 2004 13:17:42 -0800
sylvia wrote:
> i cant find the information on the on line Knowledgebase
> about this topic and plus the serch engine dont work

For starters:

http://www.dbase.com/Knowledgebase/beg/oodml_how/oodml_how.htm

http://www.dbase.com/Knowledgebase/beg/dataobj/begdata.htm

And in the Intermediate section:

http://www.dbase.com/Knowledgebase/INT/xb2vdb7oodml/x2oodml.htm

And finally in the Online help, look for

CLASS FIELD

and look at the example ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:sylvia
Subject:Re: Calculated field
Date:Wed, 29 Dec 2004 19:51:50 -0500
Thank you very much for all those links and tips ... :)
finaly i did!!! im so happy it looks like im learning .... after read too much
what i did was:
Open my form , select my query then on the inspector select events
then on the on open event i add this code:
c = new Field()
c.fieldName := "diferencia"
this.rowset.fields.add(c)
c.beforeGetValue := {||this.parent["Ped_mtto"].value - this.parent["Sur_mtto"].value}

then close and re-open my form then
yes!!! the field was added on the query and i can add the field to the form as the others ones
Coooooooooooooooooooooool!
thank you .....

Ken Mayer [dBVIPS] Wrote:

> sylvia wrote:
> > i cant find the information on the on line Knowledgebase
> > about this topic and plus the serch engine dont work
>
> For starters:
>
> http://www.dbase.com/Knowledgebase/beg/oodml_how/oodml_how.htm
>
> http://www.dbase.com/Knowledgebase/beg/dataobj/begdata.htm
>
> And in the Intermediate section:
>
> http://www.dbase.com/Knowledgebase/INT/xb2vdb7oodml/x2oodml.htm
>
> And finally in the Online help, look for
>
> CLASS FIELD
>
> and look at the example ...
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
From:sylvia
Subject:Re: Calculated field
Date:Thu, 30 Dec 2004 12:32:33 -0500
just one Question more.
I want display my field with out the Spinbox how can i just display the value??
sylvia

sylvia Wrote:

> Thank you very much for all those links and tips ... :)
> finaly i did!!! im so happy it looks like im learning .... after read too much
> what i did was:
> Open my form , select my query then on the inspector select events
> then on the on open event i add this code:
> c = new Field()
> c.fieldName := "diferencia"
> this.rowset.fields.add(c)
> c.beforeGetValue := {||this.parent["Ped_mtto"].value - this.parent["Sur_mtto"].value}
>
> then close and re-open my form then
> yes!!! the field was added on the query and i can add the field to the form as the others ones
> Coooooooooooooooooooooool!
> thank you .....
>
> Ken Mayer [dBVIPS] Wrote:
>
> > sylvia wrote:
> > > i cant find the information on the on line Knowledgebase
> > > about this topic and plus the serch engine dont work
> >
> > For starters:
> >
> > http://www.dbase.com/Knowledgebase/beg/oodml_how/oodml_how.htm
> >
> > http://www.dbase.com/Knowledgebase/beg/dataobj/begdata.htm
> >
> > And in the Intermediate section:
> >
> > http://www.dbase.com/Knowledgebase/INT/xb2vdb7oodml/x2oodml.htm
> >
> > And finally in the Online help, look for
> >
> > CLASS FIELD
> >
> > and look at the example ...
> >
> > Ken
> >
> > --
> > /(Opinions expressed are purely my own, not those of dataBased
> > Intelligence, Inc.)/
> >
> > *Ken Mayer* [dBVIPS]
> > /Golden Stag Productions/
> > dBASE at goldenstag dot net
> > http://www.goldenstag.net/GSP
> > http://www.goldenstag.net/dbase
>
From:Geoff Wass
Subject:Re: Calculated field
Date:Thu, 30 Dec 2004 12:30:33 -0500
sylvia wrote:
> just one Question more.
> I want display my field with out the Spinbox how can i just display
> the value?? sylvia




Sylvia,

In your program where you see SPINBOX, replace it with ENTRYFIELD. This will
display the value in a simple box (entryfield) without the up/down buttons
that a spinbox has.

--

:-)


----------
Geoff Wass (dBVIPS)
Montréal, Québec, Canada


==========
=======
====
=
More dBASE information at http://geocities.com/geoff_wass

Please reply in the news groups only.
Have you backed up your work?!
=
====
=======
==========
From:sylvia
Subject:Re: Calculated field
Date:Thu, 30 Dec 2004 13:12:33 -0500
tks ;-)
it works fine but i still having a withe block , i remove the border and change the color but the block still there


Geoff Wass Wrote:

> sylvia wrote:
> > just one Question more.
> > I want display my field with out the Spinbox how can i just display
> > the value?? sylvia
>
>
>
>
> Sylvia,
>
> In your program where you see SPINBOX, replace it with ENTRYFIELD. This will
> display the value in a simple box (entryfield) without the up/down buttons
> that a spinbox has.
>
> --
>
> :-)
>
>
> ----------
> Geoff Wass (dBVIPS)
> Montréal, Québec, Canada
>
>
> ==========
> =======
> ====
> =
> More dBASE information at http://geocities.com/geoff_wass
>
> Please reply in the news groups only.
> Have you backed up your work?!
> =
> ====
> =======
> ==========
>
>
>
>
From:Geoff Wass
Subject:Re: Calculated field
Date:Thu, 30 Dec 2004 16:12:21 -0500
sylvia wrote:
> tks ;-)
> it works fine but i still having a withe block , i remove the border
> and change the color but the block still there
>
>
> Geoff Wass Wrote:
>
>> sylvia wrote:
>>> just one Question more.
>>> I want display my field with out the Spinbox how can i just
>>> display the value?? sylvia
>>
>>
>>
>>
>> Sylvia,
>>
>> In your program where you see SPINBOX, replace it with ENTRYFIELD.
>> This will display the value in a simple box (entryfield) without the
>> up/down buttons that a spinbox has.
>>
>> --
>>
>> :-)
>>
>>
>> ----------
>> Geoff Wass (dBVIPS)
>> Montréal, Québec, Canada



Sylvia,

I see better what you want to do. You can play more with the properties of
ENTRYFIELD, or you can use the TEXT or TEXTLABEL object. TEXT and TEXTLABEL
would be easier to adjust to the correct visual appearance, but you will
need to know that they have a .text property instead of a .value property.
The .text property does not automatically change when the user navigates
from one row to another in your table. If you need this to happen, you can
add code to the onOpen and onNavigate events of the form like this:

form.TEXT1.text := form.rowset.fields[ "someFieldName" ].value


--

:-)


----------
Geoff Wass (dBVIPS)
Montréal, Québec, Canada


==========
=======
====
=
More dBASE information at http://geocities.com/geoff_wass

Please reply in the news groups only.
Have you backed up your work?!
=
====
=======
==========
From:Roland Wingerter
Subject:Re: Calculated field
Date:Tue, 28 Dec 2004 20:57:37 +0100
sylvia wrote:
> i cant find the information on the on line Knowledgebase
> about this topic and plus the serch engine dont work
-----
This page can be used to do a newsgroup search:

http://64.132.211.166/Docs/Search.htm

These messages are about calculated fields:

>
http://64.132.211.166/App/SearchNews.dbw?Init=TRUE&SearchStr=&SubjContains=C
alulated+Field&AuthContains=&NGroup=dbase.*&BegDay=01&BegMonth=Jan&BegYear=1
999&EndDay=01&EndMonth=Jan&EndYear=1999&Submit=Search+Newsgroups

Roland
   

Copyright © 2006 knowledge-database   -   All rights reserved