Modifying Computed field Expression
We have a software package that we use in our business, where we have some
control over customizations to the program. We don't have access to window
objects, but we have access to certain datawindows and global functions.
One global function runs when a window refreshes. The function contains a
choose case statement to determine which window is opening. It then runs
the script for that window.
I have a computed field on a datawindow that just has an Expression of 0. I
want to be able to have the Expression for the computed field get modified
through this fun...How to Modify computed field expression on Runtime?
I've a computed field with the Expression='No. '+String(getrow()).
My question is with dw1.Modify(compute1 + ".Expression='No.
'+String(getrow())") how can we put the quotes in the correct syntax. I
always get an syntax error.
Have you tried:
<DW Control Name>.Modify("<ComputedFieldname>.Expression='<expression>'")
Maybe i didn't explained myself.
The problem was the quotes when you want to do something like this:
dw1.Modify("compute_01.Expression='~~'Register ~~&...Modify () to Change String Expression For computed Fields.
I am trying to change the expression for a computed field using
Modify (). It works fine if I change it to a numeric expression
but if I change it to String expression, it fails. Probably the
syntax I am using to define the Modify string is wrong.
ls_Modify = "cf_test.Expression = 'A" + String (li_Number) + "'"
This results in an error.
Remember that in
ls_Modify = "cf_test.Expression = 'A" + String (li_Number) + "'&qu...Describe/Modify Height Expression of Computed Field
How can I modify the height expression of a computed field
on a grid datawindow (and then set it back) at runtime? The
height is set to the height of all the columns on the grid
(64), with rowheight() as the expression.
When the datawindow is saved in HTMLTable format (as part of
our routine to open the datawindow in Excel), this height
expression results in a blank row between datawindow rows.
Using Describe gets only the height value, not the
Is there a way to get the height (including the expression),
remove the expression (then save in HTMLTable format), then
r...computed field of a computed field
I made nice datawindow with some aggregate functions to calculate a certain
value at a group level.
Now I want a grand total which gives me the sum of these values.
Unfortunately this does not seem to be possible. So, when I have a computed
field which is round (sum(file_field),0) located in the trailer band, I need
a grand total of this field in the summary band. Does anyone know how to
solve this ?
in the group , you must have created a computed field having expression
sum ( file_field ) for group 1
In the summery, y...Modify Computed Field
i would like to modify a computed field in a datawindow who
is in the footer band.
When i try :
dw_trombinoscope.object.t_droite.Expression = "Page : " +
I've the message :
Error Accesing external object property expression at line
That code looks OK to me. Are you sure it is a computed field and not a
static text? t_ is usually the naming convention for a static text, which
does not have an Expression property.
<ed> wrote in message news:email@example.com...
>...Computed field expressions
I have a problem with computed expressions. I am replacing
occurence of a particular string in a computed field with
another string( say from 'mm/dd/yy ' to 'dd/mm/yy') using
powerscript and when I try to modify the expression it works
in some cases and fails in other cases. For ex
ls_syntax = ls_computename + ".Expression = " + "'"+
ls_expression + "'"
In the above I get a Modify Syntax error in some cases.
Therefore, I need a universal syntax that would work under
all cases. Does a...Computed field in a datawindow
How do I make a computed field in a datawindow editable?
You can't. But you can create computed column. It has a tab order. Go to
SQL painter of datawindow, go to computed, place 0 for number type of
editable column, '' for string type of editable column
Mahendra Dhamdhere, CPDA
Pl. Remove nospam_ from email id
Shobana Juliana wrote:
> How do I make a computed field in a datawindow editable?
>How do I make a computed field in a datawindow editable?
If you need for the user to be able to e...Modify with datawindow expression
This doesn't seem to work. I've done a Describe to get the
syntax of the expression I have for the width of a column
and am trying to set new values into the string and modify
the column. I get "incorrect syntax". Here's my string
returned from the Describe:
"837 if(sales_ind = 'Y',709, 837)"
And here is my modified string:
s_width_string = "~'0~tif(sales_ind = ~'Y~',"+string(i_v_w -
And here's my modify command:
s_errors = this.Modify( 'datetime_value.width=...Modify compute expression
i have a problem regarding a computed field that has to reference a field
dynamically at runtime. This computed field also has a group on it which
forces a pagebreak.
Now the problem is that i set the value on the computed field to 0 in the
painter, so that no pagebreak occurs. When i wan't to have the pagebreak i
try to modify the compute expression field, but nothing happens. The way i
do it is as follows:
dw_okorapport.Modify("sideskift.Expression=' sortniveau '")
dw_okorapport.Object.sideskift.Expression = " sortniveau "
...Computed field in Datawindow
PB version: 6.5
A computed field in a datawindow have not a tab order.
So, i can�t go to this field and do a 'Copy and Paste' of the value of this
try to use computed column, u can't use computed field for copy & paste as
it does not have tab order, it is only for display.
...Datawindows and Computed Fields
I am using PB 8 and have several formatted datawindows providing reports for
the end user. What has been requested of me and I am having trouble with is
as follows. I have a datawindow with a nested datawindow. The main
datawindow object contains the "parent" record and the nested one contains
"child" records. Basically an Agency has subagencies. This report is to be
used to create a manual. Where I am having the problem is that the page
numbering is done using a computed field placed in the header (or footer or
detail for that matter). I need to know the page...Computed field expression: AND or OR
Just had a strange problem.
In a computed field expression I placed following statement:
(Value of prc_discount = 0 )
- IF( NOT IsNull( prc_discount ) AND prc_discount <> 0, 'Show text',
'' ) --> Result = 'Show text'
Now by changing the expression to:
- IF( IsNull( prc_discount ) OR prc_discount = 0, '', 'Show text' ) -->
Result = ''
Can someone explain this behaviour, because I'm totally lost.
(PB 8.0.1 Build 9056 on a W2K workstation)
just a shot in the dark:
...computed field expression
I have this statement but it is not producing the desired results.
I have 2 computed fields that are supposed to get the total amount for cash
and the total for credit.
compute_1: If( payment_payment_form <> 'cash', sum( payment_amount for
compute_2: If ( payment_payment_form ='cash, sum( payment_amount for all),0)
Obviously this aboue just produces the total for both cash and credit.
I can't get the syntax right but I need something like;
If ( payment_payment_form ='cash, sum( payment_amount for all) where
payment_form = cash,0)