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.
0
Kailash
10/21/1999 5:18:16 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

2 Replies
2270 Views

Similar Articles

[PageSpeed] 47

Remember that in
ls_Modify = "cf_test.Expression = 'A" + String (li_Number) + "'"

the expression is a string
'cf_test.Expression = '

and
'     A" + String (li_Number) + "      '
is a string, you still need to put the A + string(li_number) in a string
Try this:

ls_Modify = "tester.Expression = '~~'A" + String (li_Number) + "~~''"



Kailash Visht wrote:

> 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.

--
Kenneth A. Drendel
ICQ# 34027019
Kdrendel@hotmail.com


0
Ken
10/21/1999 6:00:48 PM
Sorry I changed the col name in my exemple here is what you would use
ls_Modify = "cf_test.Expression = '~~'A" + String (li_Number) + "~~''"

Kailash Visht wrote:

> 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.

--
Kenneth A. Drendel
ICQ# 34027019
Kdrendel@hotmail.com


0
Ken
10/21/1999 6:17:28 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...

changing computed field expression
I am trying to change the expression of a computed field in a DW using both MODIFY syntax: dw_1.modify("compute_4.expression= 'text'") or dot notation dw_1.object.compute_4.expression = "text" but it does not work. Is this posible with PB9 Thanks That doesn't work because there is no column named text. You need an *expression*, such as a literal surrounded by quotes. dw_1.modify("compute_4.expression= '~'text~''") "Jon" <aaa@bbb.ccc> wrote in message news:404854a6@forums-1-dub... > I am try...

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! 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 ...

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 ~~&...

Dinamically change an expression in a computed field
Have anybody tried to change the expression of a computed field in runtime, using the Modify Expression dialog box of the datawindow painter?? How can I use this dialog box in an script?? Thanks Juan Rivera. You can't use this dialog box in script. -- Dawn T Brown Eyes (TeamSybase) Juan Rivera <jrivera_z@uol.com.co> wrote in article <ZXiggZ1y$GA.110@forums.sybase.com>... > Have anybody tried to change the expression of a computed field in runtime, > using the Modify Expression dialog box of the datawindow painter?? How can I > use this...

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...

Change value of a field from a Computed Field
Hi all ! I need to put a value to a one field from a computed field. I try this in the expression of computed field: ( field_to = value of computed field_from) But the result is "TRUE" or "FALSE". My question: the computed field is able to modify a value of another field ? How i do this ? (If possible) Thanks in advance. Alessandro Hass If you are asking if you can place a value in the primary buffer using only datawindow expressions, the answer is no. You will have to do this in script. If you just want to display something when another fi...

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...

String expression within string expression
Hey all, I have coded script that dynamically builds a where clause. This to simulate query mode in a 3-tier application. Somewhere in that code I have the following lines: CHOOSE CASE UPPER(ls_coltype) CASE "CHAR", "STRING" ls_WhereClause += " LIKE '" + la_coldata + "'" The entire code works perfectly. Except for the case where the columntype is String and the value (la_coldata) has a single quote in it. So you would get something like this: ls_WhereClause += " LIKE '" + "he's" + &qu...

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, > >...

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 " ...

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=...

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...

Value of a computed field doesn't changed after changes to one of their sources
Hi, I have a problem with a computed field in my datawindow. I need to know a specific amount which is the result of the summatory of the values of a computed field in every row in my dw. It seemed easy to me at first. I created a computed field in the detail band which must consider four different factors which were each included in a static text except for the last one which has its own computed field. Three of them won't be changed once they are assigned. But the last one changes every time I change a value in another dw. What I do once this value is changed by the user is this: ...

Web resources about - Modify () to Change String Expression For 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 ...

Joe Rogan's Facial Expression After Ronda Rousey Got Knocked Out Was Priceless - Bleacher Report
Joe Rogan 's face spoke for us all Saturday night. After UFC superstar Ronda Rousey got knocked out by a lethal kick from Holly Holm, the commentator ...

Jack Dorsey: 'Twitter stands for freedom of expression'
Newly-instated CEO Jack Dorsey laid out Twitter's commitment to open dialogue, in a keynote on stage at today's Twitter Flight developer conference ...

Make your technology a force for musical expression with this digital guitar
Computers, tablets, even iPhones have grown into powerful tools for music making, but for many who play guitar the bridge from analog instrument ...

Disney's FaceDirector changes facial expressions in movies
The new tool out of Disney Research's labs could turn an ing&eacute;nue's semi-decent attempt into a finely nuanced performance. This software ...

Turkey's YouTube Ban Violated Freedom Of Expression, European Court Rules
A YouTube ban in Turkey that lasted two years has now been ruled a violation of the European Convention on Human Rights. Back in 2008, a Turkish ...

At Public School Sports, A Constant Test of Line Between Faith Expression and Establishment
Thefine line between expressing religious faith at a government-run institution and said institution endorsing that expression, and the argument ...

Smile!: Impressive Real-Time Facial Expression Transfer
This is a video from Stanford University of a system developed to transfer one person's facial expressions in real time to a live video feed ...

How Facial Recognition Uses Super-Simple Patterns to Understand Your Expression
Facial recognition systems use all kinds of clever software to work out who you are and even how you’re feeling. But in this video explainer, ...

Expressions of Solidarity for France in Red, White and Blue
ABC News Expressions of Solidarity for France in Red, White and Blue ABC News This photograph made available on Saturday Nov. 14, 2015, shows ...

Resources last updated: 12/21/2015 4:23:48 PM