-1

I have a datawindow control named dw_1. Inside this control is a datawindow named rpt_1 and there's a computed field on rpt_1 called co_insp1.

I need to assign co_insp1 a value I calculate through an external function and the value will be different for every row. By default, I assigned co_insp1 a value of 0.

Here's my code. I'm running it in the rowretrieve event:

dw_1.Object.rpt_1.Object.co_insp1[row] = ls_inspdata

(ls_inspdata is a value I get from another function)

Can anyone tell me why I can't assign new values for this computed field?

I've also tried assigning ls_inspdata to an existing (non-computed) column:

 dw_1.Object.rpt_1.Object.v_alllogs_insp_type[row] = ls_inspdata

(v_alllogs_insp_type is the column name from database)

But that gives me this error:

enter image description here

Is there another way to do this? I'm using PowerBuilder 12.5 .NET.

Slapout
  • 3,759
  • 5
  • 40
  • 61
user2142324
  • 43
  • 11
  • This is bad I've never seen a message like that dw_1.,dw_1,retrieverow,13 something is really messed up but it's impossible to tell from what you posted. Why access values in the retrieverow event, is it part of your framework? – Rich Bianco Oct 16 '16 at 01:55

1 Answers1

1

Have you tried calling your function directly from the computed field? (I'm not sure about PowerBuilder.NET, but with PowerBuilder Classic, this was possible.)

Slapout
  • 3,759
  • 5
  • 40
  • 61
  • yes, its working on PB classic but not in .net, currently I working on project that migrate from classic to .net – user2142324 Jul 03 '14 at 00:49
  • If it doesn't work in .NET maybe you could try using the datawindow Modify function as a work-around, or an even uglier workaround set the text value expression to a global function that returns text... too bad it isn't supported. – Rich Bianco Jul 15 '14 at 18:11
  • I thought your answer was pretty good Slapout not sure why you got slapped for it (put intended, lol) The PB questions are getting fun lately huh, thats why the rates for PB went down fifty an hour. They thought your answer was a critique, nice way to say thanks right. – Rich Bianco Oct 16 '16 at 01:57