Is it possible to use a variable(computed field) as a parameter to another computed field

--____TAYPSSOPSIQFPCQHOOXS____
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I am using pb 7 , datawindow painter, a computed column

I am trying to get column data from different rows in grouped data from a =
datawindow. The easiest way to get the data was to just put the column =
name and the row needed ..ie run_seconds[-10] . This works fine except I =
need to get different rows based on rowcount for that group. What that =
means is that for one group I would need row 3,10 and 20. For the next =
group I would need rows 12, 15, 50 and so on for all the groups.=20

The problem I am having is finding a way to pass a different row number to =
the column[] call.

I have talso tried the small function, lookupdisplay functions with the =
same problem - Can't call the functions with different row number.

The lookupdisplay call almost works - I can get different column data =
based on different rows. The problem is that , the data is from the non =
grouped data. - I get the same results for all the groups. Is it possible =
to have the 'lookupdisplay function" in the datawindow painter retrieve =
the data that is grouped ? The data is grouped after the data is retrieved.=
 What  I am getting is the same data for all the groups.  This is the =
expression that  I am using in the computed field. - describe("evaluate ( =
'LookupDisplay ( run_seconds)', 1 )") - the ",1" is the row in that group. =
 The "1" is replaced by "string((count( rowcount() for group 2 )) ) + ")  =
"=20

Any ideas on how to do this ?????

--____TAYPSSOPSIQFPCQHOOXS____
Content-Type: multipart/related; boundary="____WPSSBTSOTHWLKMAVILUW____"


--____WPSSBTSOTHWLKMAVILUW____
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><FONT size=3D2>I am using pb 7 , datawindow painter, a computed=20
column</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I am trying to get column data from different rows=20
in&nbsp;grouped data from a datawindow. The easiest way to get the data =
was to=20
just put the column name and the row needed ..ie run_seconds[-10] . This =
works=20
fine&nbsp;except I need to get different rows based on rowcount for that =
group.=20
What that means is that for one group I would need row 3,10 and 20. For =
the next=20
group I would need rows 12, 15, 50 and so on for all the groups. </FONT></D=
IV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The problem I am having is finding a way to pass a =
different=20
row number to the column[] call.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I have talso tried the small function, lookupdisplay =
functions=20
with the same problem - Can't call the functions with different row=20
number.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The lookupdisplay call almost works - I can get =
different=20
column data based on different rows. The problem is that , the data is =
from the=20
non grouped data. - I get the same results for all the groups. </FONT><FONT=
=20
size=3D2>Is it possible to have the 'lookupdisplay function" in the =
datawindow=20
painter retrieve the data that is grouped ? The data is grouped after the =
data=20
is retrieved. What&nbsp; I am getting is the same data for all the =
groups.&nbsp;=20
This is the expression that&nbsp; I am using in the computed field. -=20
describe("evaluate ( 'LookupDisplay ( run_seconds)', 1 )") - the ",1" is =
the row=20
in that group.&nbsp; The "1" is replaced by "string((count( rowcount() for =
group=20
2 )) ) + ")&nbsp; " </FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Any ideas on how to do this ?????</FONT></DIV></BODY></=
HTML>

--____WPSSBTSOTHWLKMAVILUW____--

--____TAYPSSOPSIQFPCQHOOXS____--
0
Henry
9/13/2002 2:27:00 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

0 Replies
768 Views

Similar Articles

[PageSpeed] 2

Reply:

Similar Artilces:

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

how do I use a computed field as a parameter to the 'small' function in the datawindow painter
--____ZSORKMBIUCWMAICKARJT____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I am using pb7 on windows 2000, in the datawindow painter. I am trying to = use the "small" function to get the data out of a specific column. I need = to get this data for different rows, that is why I need to use a variable. = code in modify expression box =3D small( run_seconds ,run_seconds , = variable for group 2 ) variable is a computed field that does a row count = for a group. I don't get any errors, but the result is a blank. I had al...

Computing computed field
I Have a computed field in tailor band of a group. I tried to sum that computed field in summary band using another computed expression ..It is displaying 0 instead of sum . I appreciated any help Thanks Sue You can place the expression from the second field in the first one instead of referring to it. Another option (often works) is to apply the GroupCalc DataWindow method (of course outside the expression in the script where you issue Retrieve(), for example.). Sue Sambireddy wrote: > I Have a computed field in tailor band of a group. I tried to sum > t...

Computed Field not computing
I have a series of computed fields that calculate percentages and then a series that total those percentages. When I add the third total percentage field (out of four total) to my group trailer, all my total percentage fields sum to 0 when they should all sum to 100. If I move the third computed field into another band then they all sum to 100 and when I put it back they all still compute to 100. Why would this happen? I know computed fields constantly re-compute, but these are not initially computing correctly based on the number of computed fields present in my group trailer band...

Computing Computed Field
I Have a computed field in tailor band of a group. I tried to sum that computed field in summary band using another computed expression ..It is displaying 0 instead of sum I appreciated any help Thanks Sue IF you use the format sum(x for group 1) in Tailor group then use sum(x for all) in summary. Stephan Donati Fortisoft Corporation "Sue Sambireddy" <SSambireddy@bankofny.com> wrote in message news:3AE83A22.AF41D7BC@bankofny.com... > I Have a computed field in tailor band of a group. I tried to sum > that computed field in summary band using a...

using computed fields as variables
i am using infomaker 7.0.3 i have 4 computed fields with each one displaying a string text in the details section depending on what type of row is retrieved. up to 4 rows could be retrieved for every SSN (which is grouped). so each computed field either displays the info or spaces if it is null. i know infomaker cannot use variables, so I trying to use computed_fields as "variables." i combine the 4 computed fields in the group trailer section. but the computed field in the trailer group only displays the most recent row that was retrieved from the details section. is the...

Possible to sort datawindow on computed field?
I have a datawindow that has a computed field combining first and last name of a caller. When I try to sort the datawindow on that field in the script I receive a bad return code. I have double checked that the name is spelled correctly. Is there something I am missing about sorting on a computed field??? When I run the following code ll_retval comes back as -1: ll_retval = dw_1.SetSort("caller_fullname A") Thank You, Jason The only condition which I guess is 'computed field should be in detail band for sort'. -- Mahendra Dhamdhere Unicef, New York...

Using datawindow arguments in a computed field
Is it expected behavior to not be able to use the arguments in a computed field? The show up in the columns list but the expression was invalid until I put them in the set of select columns through the sql. thx jack No, it's a bug. It's been fixed, but I don't recall if it's in the EBF that was recently posted. It's tedious, but you can export the datawindow and patch it in syntax, then reimport. Oh, and we've put in Edit Source as well in DataWindow Designer, so that the export/import isn't as painful. On 8 Oct 2004 09:52:24 -0700, &quo...

How to get value from a computed field in summary band about computed field in group band?
I can get the value of computed fields in the trailer group, which have syntax ls_3 = string(dw_3.Object.day11[li_i]) where ls_3 returns, say 75 But I cannot get the value of computed fields in the summary band, which have syntax ls_4 = dw_3.Object.sum11 In the preview of datawindow, I can see the computed field of sum11 have value, say 80 But when I write ls_4 = dw_3.Object.sum11, it returns nothing. Note: computed field sum11 is a sum of day11 which is also a computed field in group band How to get value from a computed field in summary band about computed field in group...

Using user defined function in computed field in datawindow
I want to use my defined function in computed field in datawindow but the 'expression is not valid' message show after I clicked OK. How can I do this? Thanks Thaworn R. You can use global functions in the expressions of computed fields. You can't use functions that are defined in a user-object... Paul Horan VCI Springfield, MA thawornr <defaultuser@domain.com> wrote in message news:37868B05.49832C24@domain.com... > I want to use my defined function in computed field in datawindow > but the 'expression is not valid' message show afte...

Hi, freezing datawindow when computed fields r used
Has anyone had this problem? If I use computed fields on a datawindow, it often happens (most of the time actually) that the datawindowpainter seems to freeze! It happens when I wanne edit any property of that field, or even just when I select it, sometimes I have to wait for a minute until the painter is available again! Most of the time, it takes about 20 seconds.... What can be the problem here? Maybe because I use more than one computed field on the datawindow??? I dunno, please help, it's really annoying! Thanks ICE what is the expression in the computed field ? ...

computed field on top of another column in grid datawindow
Hi, I am trying to put a masked computed field (eg:##-###-##) on top of a dropdown field which has grid datasuorce. Is there a way to do this? Thanks for the help! Hi, bala nair, You can put a computed field on header band of any column in grid dw. That's all. Just click the computed field in Control Box, and then click the place where you want to add it. I hope this is helpfull. Or I misunderstand you. James bala nair wrote: > Hi, > > I am trying to put a masked computed field (eg:##-###-##) on top of a dropdown > field which has grid datasuorce. Is t...

Using Global Function in Datawindow Computed field
Hi. There is a global function returns exchange rate. The argument is currency_code and exchange_rate_date. I need to use this global function in datawindow computed field, using Datawindow's retrieval argument as an global function argument (exchange_rate_date). The problem is, in the global function, the argument exchange_rate_date is 'null'. The currency code (database field) is ok, and when i tested it using invoice_date (database field, too) , it worked. In datawindow, the retrieval argument exchange_rate_date is not null. What's wrong with it? Please, ...

Is there a way to use a computed field to get another rows data?
Say you have two rows with a date field. And you would like to build a computed field to see if the value in date field in row 1 is equal to the value in date field in row 2. Is there a trick with evaluate() that I can use? Or is there a more straight-forward way to do this? Thanks in Advance... cjharris In the expression you can use a subscript column1[val] = column2[val] The value in the subscript is in relation to the row you are on. So if you wanted to check the value of the previous row to the value of the next row it would be if (column1[-1] = column2[1], ....

Web resources about - Is it possible to use a variable(computed field) as a parameter to another computed field - sybase.powerbuilder.datawindow

Resources last updated: 1/13/2016 4:57:19 PM