Perhaps I should have explained what brought me to ask the question about 
include's behavior. Keep in mind that I'm still getting the hang of A4D.

Using the demo as my guide, I built forms (form.a4d) that had form actions of 
the same name but the extension .a4p. (form.a4p) So when the form is posted, 
the a4p file processed it and then I performed a redirect command. Usually back 
to the same page.

But I found that a redirect meant I had to perform queries again or keep track 
of various flags to make things happen once the redirect was completed.

It occurred to me that I could simply things by making the a4p file look like 
this:

<%
query([person];[person]userid = _form{user_id})
$numRecs := records in selection([person])
case of
 :($numRecs=0)
  include("create_record.a4d")
 
 :($numRecs=1)
  include("edit_record.a4d")
 
 else
  include("serious_error.html")
 
end case
 %>

This way I can use the selection created by the query and no redirect is 
needed. Since I might include a purely html file, I wanted to be sure includes 
would work like this. I was also concerned that performance might be an issue.

Is what I'm suggesting above, a standard practice with a4d? Or is there a 
better way?

Warmest regards,

Rick Hazey
bitworx, inc.
---------------------------
[EMAIL PROTECTED]
http://www.bitworx.com
---------------------------
11924 Sunray Ave. Suite B
Baton Rouge, LA 70816
(225) 293-1333 Voice
(225) 293-1330 FAX
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to