Alpha Software is focused on enabling developers to create robust, data-driven business applications that run on any PC, Tablet or Smartphone in the fastest, most efficient and cost-effective manner possible.

Share this blog:

Showing posts with label Ask the Developer. Show all posts
Showing posts with label Ask the Developer. Show all posts

Monday, November 30, 2009

Scheduling events in Alpha Five Version 10

I hope everyone had a safe and happy Thanksgiving, but doesn't Monday hurt just a little bit more after a long holiday weekend? BACK TO THE GRIND, FOLKS. How can I complain, though, when I have you to come back to?

In fact, I spent the last few days watching a customer's question about Alpha Five Version 10 be resolved quickly and easily over e-mail, and it brightened my day to be reminded that our developers are not only responsive to our customers' needs, but jump at the opportunity to help them create outstanding applications.

One of our customers recently downloaded the Alpha Five Version 10 trial, and as he put it, had spent the last week "exploring all the great improvements." But he had a question. He couldn't figure out how to create events that are triggered by date and/or time in Alpha Five Version 10.

For example, the system he's creating will allow him to enter future actions that his church needs to take regarding members who may have upcoming events, such as surgery or anniversary of a death in their family. As such, he wants the database to have a field for that date/time, which Alpha will then automatically generate an e-mail reminder on that date.

He also wants to be able to set up a recurring request to send out an e-mail (or a report attached to an e-mail) that summarizes all the recent prayer items posted into a database without requiring a person to initiate the report. But he couldn't figure out how.

That's when Alpha developer Jerry Brightbill stepped in. Since this is a question other people out there delving into Alpha Five Version 10 might have, I thought I'd post Jerry's solution here on the blog.

As Jerry said in his e-mail back to our customer, if you're working on the desktop, there are a number of methods to schedule events. The desktop has a function that can be used to set up schedules to run scripts (script_schedule()) as long as the database is open. This can be used to automate various processes. For more information on this functionality, have a look at our script_schedule() help page.

Another method is to set up an Alpha Five database that has a script called an autoexec script. When the database opens, the script runs automatically. It can perform a number of actions and then close the database when done. The database can be opened by a batch file run by the Windows scheduler. This has the advantage of not requiring a database to be open all of the time and the schedule is controlled by Windows.

A similar capability on the Web side is more challenging, but many developers have set up what are called "cron jobs." A cron (short for chronograph) is a time-based job scheduler in Unix-like computer operating systems. This lets users schedule tasks to run automatically at a certain time or date. In its infancy, it was most often used to automate system maintenance or administration, but today, it's essential for other purposes, such as connecting to the Internet and downloading e-mail.

For more information about how other Alpha users are incorporating crons into their applications, have a look at the Alpha user message board. Note: the message board will require a quick sign up to access the page.

Monday, January 26, 2009

Ask a Developer: How do you convert an app to Alpha Five from another platform?

The Alpha team recently received an e-mail from a customer with a development question. I thought it would be a great one to share with our blog readers, just in case there's anyone else out there wondering how to tackle the same project.

I have been a user of Alpha Five Version 8, and would like to convert an app from Filemaker to Alpha [Five Version] 9.

I did not see the line item "image uploads" in your grid. This was an issue with prior documentation.

I did not know if users can upload images using the Web application of Alpha [Five Version] 9. I know so far FileMaker cannot do this unless you purchase a plugin from another developer. I don't know if this plugin now works on the FileMaker 10 server, or if my host can install it without huge fees.

Please let me know about this, as I am considering rebuilding everything using Alpha.
The team sent this question my way, and here's my answer.

File uploads in a Web application can be done a number of ways, all of which Alpha can support, although all methods require a bit of coding in Alpha Xbasic.

The easiest way is to use a standard HTML input control. HTML supports a control type of file that always opens with a text box with a "browse" button beside it. Because this is a standard control, the button can not be changed or styled.

The button opens the standard file selection window on the client computer to select a file. Then the page can be submitted and the file contents captured. The entire process in covered in this Help File.

This method does not currently have Genie support to add the control to a grid or dialog, primarily because each instance is usually unique to the type of file, target location, and any file data updates that may result for the upload.

More advanced processes might require a third party upload program. There are a number of these available, although the most popular is probably Image Uploader by Aurigma. They provide an API with extensive support information. While such controls require more coding and a license, they do work with Alpha Five.

I hope this helps! Do you have a question for an Alpha developer? Send your Alpha inquiries to Jerry@AlphaSoftware.com, and you might even see it featured here on the blog.

Related Posts Plugin for WordPress, Blogger...