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

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