Alpha Software Blog



Alpha Anywhere: Integrating a Custom JavaScript Tree Control


This post was written by independent Alpha Anywhere developer David Kates. It is part 2 in a series on integrating custom controls with Alpha Anywhere. Click here to read part 1. 



Trees & Grids & Alpha… oh my!

The folks at DHX had created a JavaScript Tree control and a JavaScript Grid control and then they decided to mash the two together in the form of a control they named TreeGrid. TreeGrid can take data in XML and JSON (actually 2 different formats of JSON). Since it’s a very JSON world that’s what we’re dealing with here.

The folks at Alpha let us implement JavaScript controls easily and give us incredible abilities in Xbasic in order to feed those controls with data. In the case of the TreeGrid we need hierarchical data and grid data (if wanted) per node of the tree.


Overview video

Now...I’m not going to say this was easiest integration I’ve ever done...but the end result is well worth the head-scratching. I sat and looked at my screen patiently waiting for my brain to wrap around the concept of unlimited number of hierarchical nodes plus data for each node...or no data. Part of the challenge was that the TreeGrid likes it’s JSON a bit non-standard, which is ok, but it makes you work a bit harder for a great end result.

By the end of the journey and a reminder from Selwyn about some really interesting functions in Xbasic I had used no less than 10 of those functions including a5_treeTextToJSON, dump_properties, *tree_from_dependencies, *tree_to_outline, *variable_to_script, json_parse, evaluate_template, and vartojson. These functions are little bits of magic without which life would not be as much fun as it is. They, and many others like them, are indispensable for taking data from a sql source and turning and twisting that data to fit your needs.

The end result is a data tree with unlimited nodes and data per node. The data in each column can take the form of Editable data, Read-only, Text, TextArea, Radio Button, Checkbox, Dropdown, Price format, and Dynamic… which is like conditional formatting for the column.

Alpha Anywhere can easily talk to the world around it. That’s what makes it an amazing environment to work in.



About David Kates

David Kates is the owner of Adjustable Software, a consulting and development firm who specialize in Microsoft Access to Alpha Anywhere conversions, API integration, PayPal integration, jQuery & JavaScript plug-in integration, NFC tag scanning, and more.
Prev Post Image
What Motivated the Team at Alpha Software to Create Alpha Anywhere?
Next Post Image
Quickest way for Companies to Mobilize - Alpha Anywhere

About Author

Default Author Image
Chris Conroy

Chris Conroy runs digital programs for Alpha Software.

Related Posts
Manufacturing Data Collection Systems: Manufacturing Efficiency and Productivity In The Fourth Industrial Revolution
Manufacturing Data Collection Systems: Manufacturing Efficiency and Productivity In The Fourth Industrial Revolution
New Webinar: How to Integrate ChatGPT with Alpha Anywhere
New Webinar: How to Integrate ChatGPT with Alpha Anywhere
Best Data Collection Software For Manufacturing [2024]: A 101 Guide
Best Data Collection Software For Manufacturing [2024]: A 101 Guide

The Alpha platform is the only unified mobile and web app development and deployment environment with distinct “no-code” and “low-code” components. Using the Alpha TransForm no-code product, business users and developers can take full advantage of all the capabilities of the smartphone to turn any form into a mobile app in minutes, and power users can add advanced app functionality with Alpha TransForm's built-in programming language. IT developers can use the Alpha Anywhere low-code environment to develop complex web or mobile business apps from scratch, integrate data with existing systems of record and workflows (including data collected via Alpha TransForm), and add additional security or authentication requirements to protect corporate data.

Comment