getting a property value when expression is used on property

Hi everyone,

I'm using PB10.2.0.8011 on Windows XP.

I hate asking fundamental questions for which I know the answer lies in 
a manual, but I am having a rough time finding the answer to my question.

I initially created a computed column with expression: 
describe("day1.x"), which refers to a dw object's property which in 
itself has an expression defining the value.  The result is as expected 
a value of the form value~texpression.  So, I tried the following column 
expression to extract the actual value of x: 
describe("evaluate('day1.x'," + String(GetRow()) + ")") which strangely 
validates OK in the expression window, but I get a message "Expression 
is not valid." when I try saving the datawindow.

Any ideas?

Thanks.

Phil
0
Phil
10/26/2005 6:03:19 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

5 Replies
1028 Views

Similar Articles

[PageSpeed] 14
Get it on Google Play
Get it on Apple App Store

Evaluate only works with columns not attributes of columns.

> Hi everyone,
>
> I'm using PB10.2.0.8011 on Windows XP.
>
> I hate asking fundamental questions for which I know the
> answer lies in  a manual, but I am having a rough time
> finding the answer to my question.
>
> I initially created a computed column with expression:
> describe("day1.x"), which refers to a dw object's property
> which in  itself has an expression defining the value.
> The result is as expected  a value of the form
> value~texpression.  So, I tried the following column
> expression to extract the actual value of x:
> describe("evaluate('day1.x'," + String(GetRow()) + ")")
> which strangely  validates OK in the expression window,
> but I get a message "Expression  is not valid." when I try
> saving the datawindow.
>
> Any ideas?
>
> Thanks.
>
> Phil
0
Dawn
10/26/2005 9:38:40 PM
I was not clear on my question on my original post.  Let me try again.

How do I get the runtime value of a dw object property which is derived 
by an expression defined on the property?  In my example of wanting the 
value of the X coordinate of a column, a computed column with definition 
day1.x is not valid.

Thanks.

Dawn T Brown Eyes[TeamSybase] suggested that On 26-Oct-2005 5:38 PM:
> Evaluate only works with columns not attributes of columns.
> 
> 
>>Hi everyone,
>>
>>I'm using PB10.2.0.8011 on Windows XP.
>>
>>I hate asking fundamental questions for which I know the
>>answer lies in  a manual, but I am having a rough time
>>finding the answer to my question.
>>
>>I initially created a computed column with expression:
>>describe("day1.x"), which refers to a dw object's property
>>which in  itself has an expression defining the value.
>>The result is as expected  a value of the form
>>value~texpression.  So, I tried the following column
>>expression to extract the actual value of x:
>>describe("evaluate('day1.x'," + String(GetRow()) + ")")
>>which strangely  validates OK in the expression window,
>>but I get a message "Expression  is not valid." when I try
>>saving the datawindow.
>>
>>Any ideas?
>>
>>Thanks.
>>
>>Phil
0
Phil
10/27/2005 11:46:32 AM
You could do something like this:

describe('evaluate("' + mid(describe('day1.x'), pos(describe('day1.x'),
'~t') + 1) + ', ' + string(getrow()) + ')"')

This gets me almost all the way there -- for some reason it's returning the
actual number followed by an exclamation mark (e.g. 100! ), so that would
have to be stripped off (assuming it does that to you as well).  Also note
that for me, describe('day1.x') returns a string that starts and ends with
double quotes (i.e. the quotes are part of the return value) -- if your
version of PB doesn't do that, then you'd have to modify the above to add
the final double quote to the expression you're sending to the evaluate
function.

Also, adding computed fields to hold parts of this expression and then using
those in this final expression would probably make it easier to read and
maintain.

Hope this helps,
Ken


"Phil" <phil@nospamthanks.com> wrote in message
news:4360be18$2@forums-1-dub...
> I was not clear on my question on my original post.  Let me try again.
>
> How do I get the runtime value of a dw object property which is derived
> by an expression defined on the property?  In my example of wanting the
> value of the X coordinate of a column, a computed column with definition
> day1.x is not valid.
>
> Thanks.
>


0
Ken
10/27/2005 1:12:12 PM
Phil,

> How do I get the runtime value of a dw object property which is derived
> by an expression defined on the property?  In my example of wanting the
> value of the X coordinate of a column, a computed column with definition
> day1.x is not valid.

It's much easier to create a computed field with the expression
used for day1.x. Then you may refer to this new computed field
wherever you need: in the expression for day1.x and in the other
places where you need the x coordinate value.

--
With regards,
Konstantin Goldobin
http://www.vsi.ru/~kgold


0
Konstantin
10/28/2005 8:00:02 AM
Konstantin Goldobin suggested that On 28-Oct-2005 4:00 AM:
> Phil,
> 
> 
>>How do I get the runtime value of a dw object property which is derived
>>by an expression defined on the property?  In my example of wanting the
>>value of the X coordinate of a column, a computed column with definition
>>day1.x is not valid.
> 
> 
> It's much easier to create a computed field with the expression
> used for day1.x. Then you may refer to this new computed field
> wherever you need: in the expression for day1.x and in the other
> places where you need the x coordinate value.

Yes, I came to this conclusion.  I then re-read Bruce and Millard's PB 9 
book (chapter 7 Extreme dw's by Buck Wolley) and came up with a solution 
using a column for x coords, one for y coords, etc. for all my day columns.

Works slick.

Thanks to all.
0
Phil
10/29/2005 2:45:06 AM
Reply:

Similar Artilces:

Use DataWindow Object Properties in DataWindow Object Expression
Hi all, Can I make use of the properties of objects in the expression? For example, can I set an expression in COLUMN_A's color property which reference the color property of COLUMN_B. I don't know how to access properties in expressions. Can anyone help me? Thanks. Alex You can use the Describe() function. Alex wrote in message <362D543F.F34B5F33@hotmail.com>... >Hi all, > Can I make use of the properties of objects in the expression? >For example, can I set an expression in COLUMN_A's color property which >reference the color property of...

Get the datawindow property value
Hi, all. I know I can get the datawindow property definition using describe(). For example, if I set the width of column named "test" as: 20 * getrow(), then I can use describe("test.width") to get that definition. My question is: how can I get the really width value (not the expression string) in each row of that column? Best regards. Feng Use the Evaluate function within Describe. eg dw_1.Describe("evaluate('"+dw_1.Describe("test.width")+"', rownumber)) HTH Simon Feng Zhu wrote in message <0Jwjrjvz9GA.2...

Property access must assign to the property or use its value
 Hi, I when I tried to build my solution in vs2003 I get the following error message. "Property access must assign to the property or use its value." The following is my code to help you better understand my situation. Imports System.IO Imports System.Data.Odbc Public Class Upload     Inherits System.Web.UI.Page  Private Sub Submit1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit1.Click         Dim strFileExtension As String         Dim...

Property access must assign to the property or use its value.
I have a very basic function in my data access layer, which seems as though it is structured the same as my other functions, however it raises an error I've never seen, and I'm not sure what it means. The message reads "Property access must assign to the property or use its value."My code is as follows: Public Shared Function GetFirstPage(ByVal ParenGroupID As Int32) As SqlDataReaderDim myConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))Dim cmd As SqlCommand = New SqlCommand("MGMT_GetFrontPostPage", myConn)cmd.CommandType = CommandType.StoredPr...

Value property using FCKEditor in ATLAS is not updated, can't get Value
Hi,  I am using the ASP.NET integration of FCKEditor v2.2 inside an Atlas UpdatePanel.In a postback the editor's value is not updated and I can't get the value property of the control.  Is there any work around known?  Regards, HSHUeslei...

I use DataGird_ItemCreated Events and a droplist to DataGrid Cell,but I cann't let the droplist have a initial value , even I use SelectedValue property or SelectedIndex property
I use DataGird_ItemCreated Events and a droplist to DataGrid Cell,but I cann't let the droplist have a initial value , even I use SelectedValue property or SelectedIndex property protected void dgMain_ItemCreated( Object sender, DataGridItemEventArgs e) { if( e.Item.ItemType == ListItemType.EditItem) { DropDownList ddlPermissionCategory = new DropDownList() ; ddlPermissionCategory.ID = "ddlPermissionCategory" ; ddlPermissionCategory.DataSource = Business.AccountsTool.GetCategoryList() ; ddlPermissionCategory.DataTextField = &q...

BC30545: Property access must assign to the property or use its value.
Hi, I'm new to ASP.NET, and I've been going through the Webcasts that Bill Steel made - the 26 part series. Anyway, I'm on creating my first app, a calculator page, supposedly simple.  I came across the following error when testing the page, and I followed the video, verbatim, and still can't get my page to come up. BC30545: Property access must assign to the property or use its value.Here's the code in my Calc.aspx page: ========BEGIN CODE calc.aspx================ <% page language="VB" CodeFile="Calc.aspx.vb" Inherits="Calc_aspx" %> <html>  <head><ti...

Property access must assign to the property or use its value. #2
 Hi all.I am attempting to pass a parameter (called id) contained within the URL from one page to another using <% request.querystring("id") %>, however, when i do this i am presented with the following error message.'Property access must assign to the property or use its value.' The URL is as follows http://www.mywebsite.co.uk/spareparts/admin/edit-part.aspx?id=12 And i am using the following code to try and access and use this value <a href="change-part-type.aspx?id=<% request.querystring("id") %>"> LINK TO OT...

Error: Property access must assign to the property or use its value.
Hello, I am having a problem and I am not sure what I am doing wrong with my property: Private ReadOnly Property returnUsername() As String Get If Page.IsPostBack() = True Then returnUsername = ToString(usernametxt.Text)Return returnUsername Else returnUsername = ""Return returnUsername End If End Get End Property  I getting the error: Property Access must assign to the property or use its value.  I thought I was already doing that. Any help will be greatly appreciated. Thanks  I think you cannot use page.ispostback() from the property(i think...

Error: Property access must assign to the property or use its value.
 I am working on a project and I need to set the default values to load in the text boxes. When I insert the default values it displays the error message Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 ...

HELP! BC30545: Property access must assign to the property or use its value
Hi,   Im using a 4guysfromrolla sample to bind sqldatasource results to a label.  However Im getting the above error.  Here is my code:-----------------------------------------------------------------------------------------------------------------------------------Imports System.Data Partial Class datareaderInherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.LoadDim dv As DataView = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView) Dim rndCoinFlip As New RandomRandomProductNames.Text = St...

Get the property value using ClassDefinition object
Hi all One question: With ClassDefinition, can I get the value of the name or tag properties of an object not instantiated yet? Yes. You might need to use FindClassDefinition() to obtain the ClassDefinition object that you want. Hern�n Castellani wrote: > Hi all > > One question: With ClassDefinition, can I get the value of > the name or tag properties of an object not instantiated > yet? Since an uninstantiated variable doesn't have a value, I'm guessing you mean the initial value. Once you get the ClassDefinition, you can loop through to find ...

what does "Property access must assign to the property or use its value" means?
Hi, I am using .net 1.x here, trying to pre-select a binded checkbox list, but it complains:Property access must assign to the property or use its value I'm not sure what I did wrong with my code, would anyone please take a look at it for me please?[code asp.net]Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'load the checkboxlist with value from myClass        cblst.DataSource = myClass.getCheckBoxList()        cblst.DataB...

User Control Property Persistence
I have a user control that's rendered in a data bound List View, for example:<asp:ListView ID="ListBuildings" DataSourceId="ListDataSource" runat="server"><ItemTemplate>    <custom:Rater ID="Rater" BuildingId='<%# Eval("BuildingId")%>' runat="server" /></ItemTemplate></asp:ListView> I set a custom property on my user control called BuildingId, but on post backs I'm not finding the BuildingId property set to what I set it to in the through the list view's databind...

Web resources about - getting a property value when expression is used on property - sybase.powerbuilder.datawindow

Closed-form expression - Wikipedia, the free encyclopedia
In mathematics , an expression is said to be a closed-form expression if it can be expressed analytically in terms of a finite number of certain ...

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

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

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

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

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!

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

Redbubble, A Profitable Channel For Artistic Expression
There is a growing movement of people who never want to follow a trend. Instead they embrace their own creative self-expression and are just ...

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

Dogs Can Mimic Expressions: New Study Shows That ‘Emotional Contagion’ Gives Dogs The Ability To Mimic ...
Dogs can mimic expressions is the result of a new study coming out of Italy. In order to test their theory, researchers captured of video of ...

Resources last updated: 1/13/2016 4:50:14 AM