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

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