Tech Articles


The dwSyntax Tool


Thank you Sandy Barletta!

Just after the earth began to cool (I think it was in the PB3 time frame), I discovered the DWSyntax tool created by Sandy.

‘Round about that time I had been exporting DataWindow objects (this was before “edit source” folks) in order to get functional syntax for my dwModify() calls. Lo’ and behold I discovered this nifty GUI that would allow me to browse the dwDescribe(), dwModify(), SyntaxFromSQL() argument syntax for any DataWindow item or for the DataWindow object itself.

Fast forward to the present day. Let’s say you need to change the expression of a computed field at runtime, much as I illustrated in another tip on dynamically “creating” DataWindow groups.

From the PowerBuilder IDE, open the “New” dialogue. Select the “Tool” tabpage, and then select the “DataWindow Syntax” item.

Image

 

From the tool’s menu, navigate to Syntax>Modify>Attributes.

Image

 

From the “Object” DDLB, choose “ComputedField”.

Image

 

From the “Attributes” listbox, select “Expression”.

Image

 

You’re then presented with two versions of the syntax’s template; one for Modify() call usage, the other if you prefer dot notation. Copy/paste the template syntax and replace the bracketed portions as appropriate with explicit values or with reference variables.

DWSyntax offers this functionality without breaking a sweat. To really start utilizing the power of the tool, browse its “create” syntax capabilities…

Image

 

…or its GUI have you build SyntaxFromSQL() syntax from scratch…

Image

 

If you’re relatively new to PowerBuilder, you may find this tool to be instructive. If you’re an experienced PowerBuilder developer, I hope you enjoy the productivity this tool will provide.

Comments (0)
There are no comments posted here yet

Find Articles by Tag

Array SnapDevelop SVN Deployment PFC PowerBuilder Compiler 64-bit Excel Oracle OAuth 2.0 SQL Repository SOAP Android Source Code Windows OS Branch & Merge Git COM RichTextEdit Control ActiveX SqlModelMapper Database Table Data Charts REST .NET Assembly OLE DataWindow Testing Graph TortoiseGit OAuth Automated Testing PDFlib Service Web API PowerBuilder UI PowerServer Mobile File DataWindow JSON RibbonBar Database Table Schema Migration WinAPI Stored Procedure Export JSON Database Table Filter HTTPClient External Functions Elevate Conference Installation TreeView Messagging PDF Database .NET Std Framework SqlExecutor Expression Outlook PBDOM Database Profile Mobile Authentication DevOps Source Control Event 32-bit Error CI/CD ODBC Database Connection CoderObject Import Menu Performance Text Authorization CrypterObject Bug Sort Icon DragDrop Event Handling Event Handler Window C# Azure JSONParser Application Design SnapObjects MessageBox Model .NET DataStore Encryption InfoMaker DataType License Import JSON PostgreSQL PowerBuilder (Appeon) RibbonBar Builder Class GhostScript PowerServer Web IDE TFS Web Service Proxy Database Object Debugger Syntax Transaction OrcaScript Encoding Trial NativePDF SDK XML TLS/SSL DLL Data PostgreSQL ODBC driver BLOB JSON WebBrowser Script Open Source Database Painter Windows 10 Icons JSONGenerator Jenkins Debugging Linux OS iOS API Configuration Platform SQL Server UI Modernization Export RESTClient UI Themes Resize Interface Variable Validation Debug PowerScript (PS)