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

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