1

Topic: How correctly to work with calculated fields?

Hello!
Normal situation: in the table there are fields for overall dimensions of some goods (length, width and height), but it is required as well volume.
Entering into the table a special field volume, we, as a matter of fact, create surplus information and we risk that the data in the table can and be mismatched. On the other hand, now it is necessary to create a special field and in a special way it to process.
The method which to me is known, it to add a superfluous field in request approximately so:
SELECT length, width, height, (length * width * height) as volume FROM table
Whether however the calculated field will operatively change at change of fields of the linear sizes and whether there will be complexities with saving of results?
Besides, in Lazarus there was a special type of fields, and named: the calculated. They were not mentioned even in the text of requests (i.e. the request would be such: SELECT length, width, height FROM table) also were present only at lists of fields inspectors of request. But every time when in the program there would be a change of normal fields of request, special event in which it was possible to register calculation and assignment for a field volume was initiated. It, including, allowed to do without the description superfluous retrieval arguments request (if they were required for field calculations). Whether there is an analog in PowerBuilder?
And the general question such: as though you implemented such task?

2

Re: How correctly to work with calculated fields?

Apprehension, look aside computed fields.

3

Re: How correctly to work with calculated fields?

12/5/2016 14:12, Apprehension writes:
> SELECT length, width, height, (length * width * height) as volume FROM table
It is possible and so.
> Whether however the calculated field will operatively change at change
> Fields of the linear sizes
Itself - is not present, some be required .
> Besides, in Lazarus there was a special type of fields, and named: the calculated.
It of an echo on PowerBuilder, and here Lazarus wink?
> They were not mentioned even in the text of requests (i.e. the request would be such:
> SELECT length, width, height FROM table) also were present only in
> Lists of fields inspectors of request. But every time, when in the program
> There would be a change of normal fields of request, was initiated
> Special event in which it was possible to register calculations and
> Assignment for a field volume. It, including, allowed to do without
> Descriptions superfluous retrieval arguments request (if they were required for
> Field calculations). Whether there is an analog in PowerBuilder?
In DW painter Insert-> Control-> Computed field.
> And the general question such: as though you implemented such task?
If it is necessary to save  in text a file - the first. If it is necessary
To edit  on the screen - the second.

4

Re: How correctly to work with calculated fields?

Thanks! It seems, this that...
I sometimes remember Lazarus as I have an operation brief experience on it and consequently I draw with it analogies smile
Still a question: I would like, that value of this field could be selected and copied, but it is impossible to change.
What properties to me need to be adjusted and how?

5

Re: How correctly to work with calculated fields?

Apprehension wrote:

Still a question: I would like, that value of this field could be selected and copied, but it is impossible to change.
What properties to me need to be adjusted and how?

Hardly to turn out at computed field does not capture focus, but it is possible to try to select field value through the shortcut menu
On a clique in the field to open the shortcut menu
And for choice copy to copy value in a clipboard

6

Re: How correctly to work with calculated fields?

pand wrote:

Hardly to turn out at computed field does not capture focus, but it is possible to try to select field value through the shortcut menu
On a clique in the field to open the shortcut menu
And for choice copy to copy value in a clipboard

Yes here even the shortcut menu (on right a clique) does not open... And still - in other, normal fields to cause the shortcut menu it turns out only after I come into them, and in calculated it is impossible to come.

7

Re: How correctly to work with calculated fields?

12/6/2016 15:09, Apprehension writes:
> Yes here even the shortcut menu (on right a clique) does not open... And still
> - In other, normal fields to cause the shortcut menu it turns out only
> After I come into them, and in calculated it is impossible to come.
Here also make by means of a normal field wink. And it is even better - be engaged
Something less senseless wink.