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?

If you are using this model and not redirecting, it is better to post the form to the same page and include the form processing code. If you post to the form processor and don't redirect, the user sees the .a4p URL in the address bar of the browser, which you don't want.

Regards,

   Aparajita
   Victory-Heart Productions
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoylibrary.com

_______________________________________________
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