Using the column value of another row in computed column.

Hi fellow PBer's,
I am having trouble figuring out how to reference the column value of a specific
row.  In the computed columns property sheet, I select the "More" button to
modify the columns expression.  The way I understand help is to specify
columnname[integer] where integer is the number of rows (positive or negative)
relative to the current row (ie Total[-1] would be the value of the Total column
in the previous row.  However, I cant seem to get this to compile in the modify
expression painter.  I am using PB5.0 on Win95.  Any help would be greatly
appreciated.

Ken Zuver
0
K
11/12/1998 2:49:41 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
1149 Views

Similar Articles

[PageSpeed] 56

Ken,

Are you sure that the column name "Total" is being recognized by the DW
painter ? What happens if you just use the name "Total" as the expression -
it should compile and display the same value a second time in the same row.
If this does work, then "Total[-1]" should work. Of course, to prevent
runtime errors, I would put this within an If statement "If (GetRow()>1,
Total[-1], 0)".

HTH

Sanjiv Das [TeamPS]



K. Zuver <stocksim@aol.com> wrote in message
ubgDuukD#GA.164@forums.powersoft.com...
>Hi fellow PBer's,
>I am having trouble figuring out how to reference the column value of a
specific
>row.  In the computed columns property sheet, I select the "More" button to
>modify the columns expression.  The way I understand help is to specify
>columnname[integer] where integer is the number of rows (positive or
negative)
>relative to the current row (ie Total[-1] would be the value of the Total
column
>in the previous row.  However, I cant seem to get this to compile in the
modify
>expression painter.  I am using PB5.0 on Win95.  Any help would be greatly
>appreciated.
>
>Ken Zuver


0
Sanjiv
11/14/1998 3:55:05 AM
Reply:

Similar Artilces:

How to Modify Contents of a DataWindow DDLB column based on value of another column in the same row.
I'm trying to conditionally Modify the contents of a DataWindow DDLB column. For example, ls_modstr = "cp_basis.Values='5 Test~t5~tIf(cp_type=~~'TB~~',30 Day~t30,3 Year~t3)'" ls_rtn = This.Modify(ls_modstr) Does anyone have an example of syntax that works? Thanks, George I don't believe the values attribute will actually accept a function. Have you thought about using a DDDW instead and applying a filter dynamically? On Wed, 20 Feb 2002 11:10:21 -0500, in powersoft.public.powerbuilder.datawindow <George_Farrance> wrote: >...

Hide a Gridview column but use the value in that column when the row is selected.
I need to retrieve a column from my database but do not want to display it in the gridview.  However, I need to be able to show that information later in the application.  I am using the wizard control.  I believe I can use the DataKeyValues property of the gridview but can't figure out how to write the code to get the value of the cell in that column when the row is selected so it can be referenced later.  I am using VB.  Thanks for your help!! Found the answer.  Here it is in case anyone else needs it:       &nbs...

computing the difference of a column in the current row from the column of the preceding row
Hello, a user asked me if we can solve following problem: we want to compute the difference (delta) of a column in the current row from the column of the preceding row. My first solution signs where: create a computed field (small_function_result) that takes the value from the preceding row: small(value, value, cf_getrow for all); where cf_getrow is a computed field like this: if(getrow()=1,getrow(),getrow()-1) create a computed field (Diff) that computes the difference: value-small_function_result My results should look like this: Row Value cf_getrow small_func...

Select particular row and take the value of particular column selelcted row and pass the value to another page
Hi,  i'm making one webform where i'm displaying datafileds  through GridView. GridView has 6 columns like name, Id, & etc with two icons. one is email icon and another one is mobile icon. In those there are three Buttons(name, email, mobile). When the user clicks on email then it takes the values of email and it forwards to another page and mobile too. Here i can set and pass the  value of email, i'm able to pass the values when i click on email icon and it is passing successfully to another page but it is playing the same action whe...

How To set value of a column from a computed column
PB 5.0 I use the following statement: dw_1.object.share_cost.data[1,ll_row]=dw_1.object.a_share_cost.data[1,ll_row ] then it occur errors 'Error accessing external object property data' If I use getitemnumber function to access each row it is OK but it is too slow. How to fast the process? Jimmy April 28,2000 Hi Jimmy, This error could for one of the following reasons. 1)There may be a datatype mismatch on a column when copying. 2)Number of columns in each datawindow may not match. 3)One of the columns may have the value(Number)> 32k. PB 5.0 has a bug in dot ...

Passing value from one column to another column
Hi friends, I have  two drop down list controls in the Grid view control.I bound the data from data base.My problem is:             When i select value from first drop down list, the corresponding second drop down list generated  according to the  value selected in first drop down list.Please help me Regards.   Akhil   Regards,Akhil Raj K.R.Collaboratz. The Ajax Control Toolkit has a drop down list extender to use.  Goto http://www.asp.net/ajax/ajaxcontroltoolkit/  and review the C...

counting multiple values from the same column and grouping by a another column
This is a report I'm trying to build in SQL Reporting Services. I can do it in a hacky way adding two data sets and showing two tables, but I'm sure there is a better way. TheTable Order# Customer Status STATUS has valid values of PROCESSED and INPROGRESS The query I'm trying to build is Count of Processed and INProgress orders for a given Customer. I can get them one at a time with something like this in two different datasets and showing two tables, but how do I achieve the same in one query? Select Customer, Count (*) As Status1 FROM TheTable Where (Sta...

Error with dddw using computed column as data column
Hi, I'm working with PB 5.0.04 on Win 95. I have a datawindow object which I want to use as dddw. This datawindow object retrieves a numeric ID and three string fields from a table. I created a (named) computed field in the detail band which consists of a concattenation of the three string fields. I'm not allowed to use a SQL computed column. When I use this datawindow object as dddw with the computed column as display-item and the ID as data-item I can't store the (main) datawindow. I get a "syntax error at line ## in column ##" ...?? Can this be c...

Move data from one column to another column and row
I need some help converting a table which has one row for each year.  Displaying the data so the each row will contain all of the information for the title and all of the years displayed in separate columns. I have a SQL Querry which returns the data looking like this (the querry is grouping by Title and by year, then adding up the quantity of rows): Basic Information needed for Life Insurance 25 2005 Basic Information needed for Life Insurance 45 2006 Ea Chairmans Conference 10 2005 EA Chairmans Conference Press Release 33 2005 EA Chairmans Conferenc...

GPF if i use Computed Column with Datawindow
GPF if i use Computed Column with Datawindow ...

How to go through a datatable row by row and column by column
Hello, I have a dataset with a datatable and I need to insert each row from the datatable on my sql table, anyway there may be errors, so some rows may not be inserted because primary key constraints,  So I need to show the rows that are not inserted in a gridview, the hard thing to do is to go through all the datatable,  is there an wasy way to do it?MCPD ENTERPRISE APPLICATION DEVELOPER Start by looking herehttp://msdn2.microsoft.com/en-us/library/system.data.common.dataadapter.update.aspxPerform an update of your dataset, and if a row fails, you can mark it as invalid.You can ...

When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go against the same table. Recently, I had to add a column to that table, and also add the column to ALL of these datawindows that go against this table. I added the column to the first datawindow, set up the edit control style, etc. I then did a copy/paste of the columns edit control to the remaining dw's (of course remembering to first add the column in SQL). Everything (update props, column specs, column props) seems to indicate that the pasted column is linked to the column I selected, HOWEVER, when I...

Comparing one column group value to another column group
Hi there, I'm trying to get the difference between two values that are in seperate column groups:   Class Session 1 Class Session 2   Math Score Math Score Diff from class 1 Student 1 75 70 -5 Student 2 75 90 +15  In other words, I want to subract the math score of class session 1(column group1) from the math score of class session 2(column group 2) and place that value in a new column that resides within column group two.  I have a bootleg way of getting the column to show up for column groups that are not first, but I have no idea h...

setting a column of a datawindow for all rows to a value
Hi, I was wondering if there was a way to set all rows of a column in a datawindow to 1 value, without looping through all of the rows. I tried the: dw_export_marked_extract_c.Object.<column_name>.Primary[1, li_num_rows] = li_value but, it only sets the first row in the datawindow to the li_value. It did work with an array of li_value[], where every element is the same value. But you still have to loop through the array to populate it. Thanks ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Unless the data that you ...

How to place in DataGrids’s first column table’s column name, in second Datagrid’s column table’s column value?
Hello I use C#. I’m interesting are there samples solved my problem. Andrew. You will need to loop through the datasource of the datagrid or through the datagrid items and fetch the values for the second datagrid.Sonu Kapoor [MVP] Feel free to ask me any .NET question | Ajax Data Controls Forum Thank you! I solved my problem at the server cite. Andrew. ...

datawindow.column.count not returning column count using dot or Describe
I am having problems with the datawindow.column.count property of a datawindow. It just started happening with PB 6.501 and still works fine in PB 5.0. The function that looks at this property is in an ancestor userobject. The dataobject is assigned at this point but all other properties of the datawindow are missing. Any suggestions? ...

want to choose between URLs for a hyperlink column based on another columns value
I'd like to know if this is possible! I want to be able to select the URL I am  going to load when I click on a hyperlink column field. The value in another column will determine what URL is selected.    EXAMPLE Completion Date" DataField="Scheduled Completion Date">Completion Date" DataField="Scheduled Completion Date">Completion Date" DataField="Scheduled Completion Date">   Col1   Col2   1         T   2         S  ...

Deleting Rows with Identity Columns through Powerbuilder Datawindow
Perhaps I should be posting this in a Powerbuilder newsgroup, but I am having the following problem: I have a Powerbuilder 6.5 application which is using an ASE 12.5 database with Enhanced Full Text Search. Because of the EFTS, many of the tables make use of identity columns. Whenever users attempt to delete a row from one of these tables through a datawindow, they receive a "Rows Changed Between Retrieve and Update Error"! I have tried changing the "ON DELETE" settings of the datawindow, but to no avail. However, I can delete records from the table th...

How to create dynamic columns in the Datawindow Using powerbuilder
Hi, Can any one let me know How to create dynamic columns in the data window using modified method. Thanks in Advance Rami Hi, Please refer "Datawindow Syntax" tool provided by sybase for generating the syntax to create dynamic columns. /*************Dynamic column Syntax <DW Control Name>.Modify(& "create column( id=<an integer> tabsequence=<an integer> accelerator='<a single letter>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 - True> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!,...

Column values truncated after first row of datawindow
Having a problem with column values being truncated after the first row in a datawindow. For example, I have three columns; Cases, Pack, and Variety Name with values of 100, 12, Hammer in row 1 and 2000, 100, Screwdriver in row 2. After the dw.Update() the values in the database table for row 2 are 20, 10, Screwd. Any row after row 1 is updated using the column lengths for the values in row 1. Cases is defined as decimal(0) Pack is defined as decimal(0) Variety Name is defined as char(40) PB 7.0.3 Build 10180 Oracle 8.0.4/8.0.5 Maybe posting the SELECT statement of...

problem with the datawindow Rows-Update Properties
i am trying to set up a datawindow for a table with a compound primary key where one of the columns is a datetime column (ASE 11.5) : xpkactivity_action_note clustered, unique activity_num, action_datetime, resource_id, activity_action_id The action_datetime column doesn't appear in the Unique Key Columns() list box in the Specify Update Properties which results in the update not working properly because the where clause is incorrect... (the column is in the Updateable Columns list). when i press the Primary Key button, it selects the other 3 columns. i can't find a...

datawindow.column.count not returning the column count of a datawindow
I am having problems with the datawindow.column.count property of a datawindow. It just started happening with PB 6.501 and still works fine in PB 5.0. The function that looks at this property is in an ancestor userobject. The dataobject is assigned at this point but all other properties of the datawindow are missing. Any suggestions? Don't recall, but was it still dwDescribe() in version 5.0? If it was that may be your problem. HTH Kent Montgomery wrote: > I am having problems with the datawindow.column.count property of a > datawindow. It just started happenin...

Calculated column from columns in same row??
Hi everyone - Is there a way to display a calculated value in a column based on values from the same row? Using a datagrid thanks tony Sure. Have a function declared for your OnItemDataBound: Sub CalculateValues(ByVal sender As Object, ByVal e As DataGridItemEventArgs) dim total as Integer = CType(e.Item.FindControl("col1"), Integer) + CType(e.Item.FindControl("col2"), Integer) e.Item.FindControl("totalCOlumn").Text = total End Sub I think it would be something like that.Sarahttp://www.ilovecode.com If yo...

computing fields from column to column
Hello dw-experts! I have a weird problem designing a report: I want to balance a cash account (dictionary!). So I have an initial amount of money and a variying number of vouchers. Now I'd like to compute the new bookstock for every voucher. e.g. intial amount: � 100,-- voucher in/out amount stock old stock new voucher 1 IN � 15,-- � 100,-- � 115,-- voucher 2 OUT � 10,-- � 115,-- � 105,-- I already realized this using a temp-table but to prefent the use of temp-tables and for other reasons I'd like this to be computed within ...

Web resources about - Using the column value of another row in computed column. - sybase.powerbuilder.datawindow

Single-photon emission computed tomography - Wikipedia, the free encyclopedia
However, it is able to provide true 3D information. This information is typically presented as cross-sectional slices through the patient, but ...


For Jacki Weaver, 'Silver Linings Playbook' finally computed
Jacki Weaver of 'Silver Linings Playbook' says it was a thrill to work with Robert De Niro in David O. Russell's quirky film.

A Lion Goes Undergoes Computed Tomography Because Even Big Cats Need a CAT Scan Every Once in a While ...
... The Leibniz Institute for Zoo & Wildlife Research (IZW) in Berlin, Germany, today inaugurates the world’s most advanced state-of-the art computed ...

The guy who found Waldo computed the longest American road trip
... Olson, a doctoral student at Michigan State, and asked him to compute one of the most complicated road trips ever. (Olson previously computed ...

Discovering How Greeks Computed in 100 B.C.
The Antikythera Mechanism organized the ancient Greek calendar in the cycles of the Olympiad, researchers say.


Technique using computed tomography associated with improved detection of lymph node metastasis in patients ...
Preoperative 3-dimensional visualization of sentinel lymph nodes (SLNs) with a technique known as single-photon emission computed tomography/computed ...

Chromatin Conformation Computed
By manipulating DNA sequences that guide genome-folding, researchers confirm an existing model of chromatin structure inside the nucleus.

Researchers use computed microtomography to identify well preserved fossil arthropod
Ludwig Maximilian University researchers have used computed microtomography (micro-CT) to identify to the species level an exceptionally wellpreserved ...

Resources last updated: 2/18/2016 7:53:50 AM