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

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