modify expressions in computed fields ?

Can i modify expressions in computed fields depends on the
value in a column like other properties like color
(exam: text.Color='0~t If (formel_id =1 ,255,0)' )??

thats my test_modstring:
c_test.Expression='0~tIf(formel_id =1 ,1+1,0)'
i have only Syntax error at the last column.

Thank you very much!
0
micha2003
10/2/2003 1:13:55 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
356 Views

Similar Articles

[PageSpeed] 32

Sure you can. Off hand your syntax looks ok. Replace "forme1_id" with a
constant and see if it accepts the syntax:
'0~tIf(1=1 ,1+1,0)'

First get it working in the DW painter. Then copy that syntax out and use it
in your modify.

Regards,
John
Team Sybase

<micha2003> wrote in message news:3f7c2493.4447.846930886@sybase.com...
> Can i modify expressions in computed fields depends on the
> value in a column like other properties like color
> (exam: text.Color='0~t If (formel_id =1 ,255,0)' )??
>
> thats my test_modstring:
> c_test.Expression='0~tIf(formel_id =1 ,1+1,0)'
> i have only Syntax error at the last column.
>
> Thank you very much!


0
John
10/2/2003 1:23:25 PM
Reply:

Similar Artilces:

Modifying Computed field Expression
Hello, 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?
Hello, 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. Thanks, Miguel 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. String ls_Modify Integer li_Number ls_Modify = "cf_test.Expression = 'A" + String (li_Number) + "'" dw_1.Modify (ls_Modify) 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 expression. 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
Hello, 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 ? Philip. Philip@acom.be (Belgium) Philip, 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
hello, 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 : " + string(il_page) I've the message : Error Accesing external object property expression at line 61 .... Why ?? Thanks ed 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:41fab6db.ce1.1681692777@sybase.com... > hello, > >...

Computed field expressions
Hi all, 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 + "'" this.modify(ls_syntax) 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 Email:nospam_mahendrad@hotmail.com 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? You don't. 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 - 128)+", "+string(i_v_w)+")~'" And here's my modify command: s_errors = this.Modify( 'datetime_value.width=...

Modify compute expression
Hi there, 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 '") or 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 field. Thanks... 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
Hi all, 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) TIA, PascalB Hi Pascal, 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 all),0) 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) Any ideas?...

Web resources about - modify expressions in computed fields ? - sybase.powerbuilder.datawindow

Expression (sign language) - Wikipedia, the free encyclopedia
Signs with two different expressions. The pursed lips and partly closed eyes on the left, and raised lip on the right, are necessary for proper ...

Fighting abuse to protect freedom of expression
We believe that protection from abuse and harassment is a vital part of empowering people to freely express themselves on Twitter. Today, as ...

Campus no longer safe place for freedom of expression says free speech advocate
A group representing free speech in Canada says universities are no longer safe places for free expression, instead shying away from being forums ...

Apple acquires ‘Emotient’ facial expression & emotion detection technology
The Wall Street Journal reports Apple has confirmed it has made an acquisition of artificial intelligence startup Emotient . The cloud-based ...

Turkey setting ‘poor example’ for freedom of expression: Biden
Turkey setting ‘poor example’ for freedom of expression: Biden

Facial Expressions and Tail Expressions
Submitted by: (via Daniel J Farrell ) Tagged: dogs , face , expression , tail , wag Share on Facebook

How One Conservative’s Lost Twitter Badge Spells Trouble For Free Expression
How One Conservative’s Lost Twitter Badge Spells Trouble For Free Expression

Leonardo DiCaprio Reacts to Lady Gaga's Golden Globes Win See His Hilarious Expression!
Leonardo DiCaprio Reacts to Lady Gaga's Golden Globes Win See His Hilarious Expression!

US: Joe Biden slams Turkey for ‘poor example’ of freedom of expression
US Vice President Joe Biden has criticised Turkey for “setting a poor example” in the region concerning freedom of expression. The damning comments ...

Apple Buys A Startup That May Help It Read Your Facial Expressions
The Emotient software could be used to make Siri more aware of the moods of her human masters. Apple wants its devices to understand the emotional ...

Resources last updated: 2/12/2016 10:34:16 AM