Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to get the name of datawindow ?

2,433 views
Skip to first unread message

wong KS

unread,
May 11, 2008, 12:06:54 PM5/11/08
to
I have a datawindow 'dw_sample' , I put a new expression in that
datawindow : "describe('datawindow.name')", but it return the result :
'datawindow', and not the name 'dw_sample'

am I describe the wrong expression ?

M. Searer

unread,
May 11, 2008, 3:51:15 PM5/11/08
to
you can't get the name of the datawindow from within the datawindow.


"wong KS" <wongk...@gmail.com> wrote in message news:4827199e@forums-1-dub...

Dave Fish [TeamSybase]

unread,
May 11, 2008, 7:09:36 PM5/11/08
to
Do you want the name of the DataWindow object assigned to the
DataWindow control? Just use the dataobject property:

string ls_dw
ls_dw = dw_1.dataobject

Regards,
Dave Fish
Sybase

PowerBuilder Blog:
http://powerbuilderevangelist.blogspot.com/

wong KS

unread,
May 12, 2008, 9:57:00 AM5/12/08
to
no, I want to show the name of the opened datawindow itself, not from
the window that open the datawindow.

wong KS

unread,
May 12, 2008, 9:55:57 AM5/12/08
to n0Spam...@sybase.com
no, I want to show the name of the opened datawindow itself, not from
the window that open the datawindow.

wong KS

unread,
May 12, 2008, 9:57:33 AM5/12/08
to
why the datawindow didn't know his own name ?

Philip Salgannik

unread,
May 12, 2008, 12:14:01 PM5/12/08
to
Where do you want to show it?

"wong KS" <wongk...@gmail.com> wrote in message
news:48284cac@forums-1-dub...

Paul Horan[TeamSybase]

unread,
May 12, 2008, 12:31:08 PM5/12/08
to
Having a calculated field in a datawindow that could return the dataobject
name would be a "nice to have" for support calls.

User: "The calculation in the aged receivables report is incorrect."
Support: "Look at the field in the lower right hand corner. What does it
say"
User: "r_aged_receivables_by_customer_YTD"

Paul Horan[TeamSybase]

"Philip Salgannik" <PhilipS...@work.com> wrote in message
news:48286cc9$1@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
May 12, 2008, 12:39:30 PM5/12/08
to
I must be missing something. Why not a static text set up at design time?
Or if you want it available for support but don't want to take up real
estate, an item in the help menu could display the dataobject of the active
DW in the active window/sheet.

"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message
news:482870cc@forums-1-dub...

HarryLai

unread,
May 12, 2008, 1:01:29 PM5/12/08
to
You cannot get the name of "dw_sample" because this is a control name. If you wanna get it and display in somewhere of your
datawindow, you can use Classname() to get this control name in dw constructor event, then fill it to you object in dw. : )


"wong KS" <wongk...@gmail.com> ???????:48284ccd@forums-1-dub...

Philip Salgannik

unread,
May 12, 2008, 1:47:07 PM5/12/08
to
Will be handy for dynamically created ones too :-))))

"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message
news:482870cc@forums-1-dub...

Paul Horan[TeamSybase]

unread,
May 12, 2008, 2:22:47 PM5/12/08
to
"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:482872c2@forums-1-dub...

>I must be missing something. Why not a static text set up at design time?
> Or if you want it available for support but don't want to take up real
> estate, an item in the help menu could display the dataobject of the
> active DW in the active window/sheet.
>


Because I can take an existing report, say
"r_aged_receivables_by_customer_YTD", do a SaveAs to
"r_aged_receivables_by_customer_QTD", change it all around to do quarterly
totals, and forget to change the static text.

Now they both say the same thing, even though they're different report
objects.

-Paul-


Dave Fish [TeamSybase]

unread,
May 12, 2008, 3:35:54 PM5/12/08
to
You could just create a retrieval argument and pass the .dataobject
value in the retrieve function call at runtime and display that in a
computed field.

Regards,
Dave Fish
Sybase

PowerBuilder Blog:
http://powerbuilderevangelist.blogspot.com/

On 12 May 2008 09:31:08 -0700, "Paul Horan[TeamSybase]" <phoran AT

M. Searer

unread,
May 12, 2008, 4:19:42 PM5/12/08
to
I thought I had added this as an enhancement request on ISUG; but apparently
not.
I put this request into the futures discussion newsgoup in 2002; I'll add it to
ISUG for visibility.


"wong KS" <wongk...@gmail.com> wrote in message news:48284ccd@forums-1-dub...

M. Searer

unread,
May 12, 2008, 4:34:51 PM5/12/08
to
IMO, it is only really needed for anything that can be printed or "saved as".
As you say, a menu item can be setup to show the datawindow.

All of our reports use the static text method - every release there are
sometimes a few with the wrong name.
Plus, if a user creates a report in infomaker they rarely set the name
correctly.

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:482872c2@forums-1-dub...

Jim Madderra

unread,
May 12, 2008, 5:39:16 PM5/12/08
to
What OP wants and I concur is a datawindow function like getrow() but
instead getname() that gets the dataobject name (inside the dw). Something
I've wished were there for ages.

"Dave Fish [TeamSybase]" <n0Spam...@sybase.com> wrote in message
news:t3ve24h97288mol0l...@4ax.com...

Terry Dykstra

unread,
May 12, 2008, 5:38:48 PM5/12/08
to
I've requested that feature too many many years ago. It just seems such a
no-brainer to have a dw function that tells you its own name. My InfoMaker
users always get their hardcoded names right <g>

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com/cx/cx.stm
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"M. Searer" <nos...@nospam.com> wrote in message
news:4828a65e@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
May 12, 2008, 5:50:11 PM5/12/08
to
Post when you do so I can vote for it.
What would it return if the DW was created dynamically instead of from a
dataobject?

"M. Searer" <nos...@nospam.com> wrote in message
news:4828a65e@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
May 12, 2008, 5:53:03 PM5/12/08
to
The datawindow syntax is just a bunch of text. The logic is all in the
datawindow engine (PBDWEnn.DLL) and it apparently is not getting the
dataobject name from the PBVM.

"wong KS" <wongk...@gmail.com> wrote in message

news:48284ccd@forums-1-dub...

M. Searer

unread,
May 13, 2008, 10:54:19 AM5/13/08
to
chris approved it so I think it it there.
That is a good question -> What would it return if the DW was created
dynamically
Maybe we need the ability to name it when it is created dynamically, or else
have it generate some bland type of thing like 'dynamic_obj_123'

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message

news:4828bb93@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
May 13, 2008, 11:10:34 AM5/13/08
to
I don't see the DW engine keeping track of suffixes like that. Since the
major use would be for display, maybe just "Dynamic". Or an optional
argument allowing the developer to specify a name if there is no actual
dataobject, defaulting to "Dynamic".

"M. Searer" <nos...@nospam.com> wrote in message

news:4829ab9b$1@forums-1-dub...

wong KS

unread,
May 14, 2008, 11:03:50 AM5/14/08
to
We are heading to an independent working object in internet technology,
that's why I think not passing too many variables to datawindow. the
datawindow should have all functions of working variables.

regards,

wong KS

cfauvel

unread,
May 15, 2008, 9:50:44 AM5/15/08
to
It is intersting that the DWO name isn't in the source for the dwo in
question. It appears when you export it, but not edit source...hmmm

I concur this something usefull, and probably should have shown up versions
ago.


"Jim Madderra" <jmad...@astound.net> wrote in message
news:4828b904$1@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
May 15, 2008, 10:36:27 AM5/15/08
to
It makes sense to me. The export process knows what file it is reading, but
the syntax itself is just an ASCII file - it could be copied, renamed, or
created by another process. But the DW control knows what DW object was
loaded by setting dataobject.
The PBVM would have to know what PBL the dataobject came from, so maybe that
information could be made available.

"cfauvel" <CFa...@yahoo.com> wrote in message
news:482c3fb4$1@forums-1-dub...

Dave Fish [TeamSybase]

unread,
May 16, 2008, 9:27:37 AM5/16/08
to
A new expression function will be added to return the DataWindow name
for the new WPF DataWindow in PowerBuilder 12.

I don't know yet if this will be added to the current native
DataWindow for 11.5.

Regards,
Dave Fish
Sybase

PowerBuilder Blog:
http://powerbuilderevangelist.blogspot.com/

On 11 May 2008 09:06:54 -0700, wong KS <wongk...@gmail.com> wrote:

0 new messages