1. Tracy Lamb
  2. PowerBuilder
  3. Friday, 13 December 2024 23:17 PM UTC

Hi all,

I keep getting an error message when trying to modify the document name on a datawindow.  Here's the code:

dw_1.Retrieve(il_workorder)
is_CertName = "Cert" + string(il_workorder)
ls_modify = "Print.DocumentName=" + is_CertName
ls_return = dw_1.Modify(ls_modify)
if ls_return <> "" then
	MessageBox("Modify", ls_return)
	return
end if

 

The message says it's line 1 char 19 ... that's the = symbol.

Clearly there's something wrong with the syntax, but I don't know what it would be.  Any assistance is appreciated.

~~~Tracy

Accepted Answer
Tracy Lamb Accepted Answer Pending Moderation
  1. Friday, 13 December 2024 23:44 PM UTC
  2. PowerBuilder
  3. # Permalink

Never mind, I figured it out... 

ls_modify = "Datawindow.Print.DocumentName=" +"'" + is_CertName + "'"

ls_return = dw_1.Modify(ls_modify)

 

That was painful!

~~~Tracy

 

Comment
  1. Chris Pollach @Appeon
  2. Saturday, 14 December 2024 02:54 AM UTC
Hi Tracy;

Next time, try using the DW Syntax utility in the PB IDE's toolbox to generate that Modify code for you. ;-)

Regards ... Chris
  1. Helpful
There are no comments made yet.
Tracy Lamb Accepted Answer Pending Moderation
  1. Friday, 13 December 2024 23:37 PM UTC
  2. PowerBuilder
  3. # 1

Also tried ls_modify = "Datawindow.Print.DocumentName=" + is_CertName

Now I'm getting a syntax error at column 44 ... that's at the end of the modify statement, which is 44 characters.

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.