New Purchaser, still learning

I am using Scriptcase to retrofit a project which manages inventory for a commercial plant nursery. I have built our the ordering forms which verify inventory and assign products to the customers. Now I am building the delivery system which will look at the products on order, and allow the user to schedule the delivery of those products. I also want to inherit the customer delivery fields form the customer table which is linked though a foreign key.

In the past, I have used a MySQL view to identify those products which the customer has “on order” and I have used an Ajax process to queue up the delivery data when the customer selects the customer id from a dropdown list. Would the correct process be to use PHP methods to populate the results in each of the delivery fields on my new form and use an onChange ajax procedure to trigger the update?

Welcome aboard Edward!
I’ve been using Scriptcase for enterprise development for several years and I can tell you the most difficult part of any solution is determining the “best” way to do something. In truth absolutely anything is possible with Scriptcase, but depending on your particular needs (Or the clients), there are sometimes “better” methods to doing something.

I am not 100% sure that I understand what you are trying to accomplish based on your post… when you mention what you have done in the past are you referring to methods you have used within Scriptcase or some other framework/system ?

Thanks for the reply. Your words ring so very true, I have only scratched the surface of what Scriptcase can do. I made the purchase based on the RAD capabilities. The grids and forms are so easily built and very solid in overall performance. I also agree the “best” way has had me wrapped around the axle a bit.

My intent for the post was to initially get an idea of the “temperature” of the forum, many framework and programmer forums can be a bit snarky about certain questions. Most of my work has been done in PHP, using JQuery, Ajax and some JS. I have to confess that I am somewhat self-taught and have cobbled together my portfolio by leveraging tutorials and the occasional manual to build a set of tools as I have needed them.

In any event, most of my projects have been for small businesses or schools and are designed to create forms which normalize data entry by controlling input and using foreign keyed values to ensure referential integrity.

The particular application I want to build is the second phase of the ordering process, that is scheduling the delivery. The customers can place orders to be delivered throughout the season. So I created an order and orderDetail table. My goal is to present the user doing the scheduling with the list of orderDetail items (less any that have already been delivered) . I have done this before using a view that shows the ordered items yet to be delivered, by customer.

This data is then fed to another Master/Detail application delivery, deliveryDetail that once modified will be inserted into database tables of the same name.

I have generally used Ajax to retrieve the records from the view and organize the data into an HTML table. This table has allows the user to modify the quantity field (should they need to reduce the remaining ordered amount due to spreading out the original order over several deliveries), change pricing, apply volume discounts and modify delivery instructions.

I also want to populate the master form with the customer information (delivery address, contacts and instructions) entered by the person scheduling the delivery.

Scriptcase does an amazing job showing label fields on select fields. But I wondered if there is a way to flow an array of data from the customer table to several fields (address, city, state, contact_name, contact_phone etc.) in the master form. I am thinking this should be a php method that queries the database using the customerId value form the select field and then maps each field in the returned record to a variable which is then assigned to the field in the Scriptcase app. This of course triggered by an OnChange Ajax event.

This is a very new way of thinking about the way I have been doing things in the past, so I appreciate your patience and look forward to any advice or documentation which you think would be helpful.

Excellent reply Edward! Glad to have you as a part of this community. Don’t ever succumb to “imposter syndrome”… your path to your current skillset very closely mirror’s my own. Self taught means many things to folks like us… we get the job done because it needs to be done.
Ok, to address your current situation… if you want to populate several fields at one using an Ajax OnChange event you can skip the PHP Method part entirely… see the below.

Thank you for the excellent example. I look forward to using this.

I do have one other question regarding Master/Detail applications. The documentation states that only grids can be used as a detail table. However I did create a Master/Detail using a Multiple Records form on my local machine during the trial phase. I liked the way the Multiple Records for listed ten rows which reduced the button clicking to add a new line as the user is adding items to their order. I was able to select Multiple records from the Detail Properties dialog box so i assume the documentation has not caught up to the code.

The updates worked perfectly on my local PC. I have moved to my server and have started coding on my local PC using the host db on the server, but for some reason my detail for is not appearing, and I am also getting timeout messages (which could be from the fact I am local for the app and the server is remote). What might cause the detail application to fail to start upon completion of the Master?

Please let me know if these questions become too troublesome!

If you need any help to understand how to use and/or maximize Scriptcase, I am here to help as far as my knowledge allows.

Si necesitas alguna ayuda para entender como utilizar y/o maximizar Scriptcase, estoy para ayudar en lo que mi conocimiento lo permita

Many thanks, Ebel. I am mainly working to re-write and upgrade features in some existing projects I have created using PHP, MYSQL, Ajax, JS, and some JQuery. All of the projects manage workflow around a MySQL database. I use forms to get users to enter data which they used to write down on paper and later enter into Excel spreadsheets.

My main usage is for purchase orders and delivery tickets and invoicing for a small commercial plant nursery. All of these applications need to be Master/Detail forms, customer data is the master and product informaiton is in the detail. I have been able to successfully create Master applications as wel as detail applications (mulitple record forms), but when I link the detail to the master, when I run the master is completes and updates the header table, but it does not activate the detail application to open the form to load the product data. I assumed the Ajax command was created in the process of linking the applications, is there a need to add an Ajax event to make the detail appear?