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

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