Alpha Video Training
Results 1 to 20 of 20

Thread: Form Advice Needed .....

  1. #1
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Form Advice Needed .....

    I have created a police report that has a parent table which contains general report info. i.e. Date, Time, Case Number, etc. I then have a child table that contains the names of people associated with the report, such as Victims, Witnesses, etc., and is linked by the Case Number. (I would like to have no more than six "people" entries per report.) Now here's my question:

    I want to create a form that will allow the user to input the parent data, and have fields for six persons. I've tried placing the "person" fields on the form six times from the 'drag-n-drop' list, but all I get is six fields that end up showing whatever data was entered in the first one.

    So far the only way I've been able to enter six different people is to use an embedded browse, but that really doesn't work well on a police report.

    I've been able to make this senario work on the web with the A5v6 Web Application Server (which is really unrelated to this forum) by setting the properties to show six new record entries at a time, but can't seem to figure out how to do the same thing on a form, and with version 4.5.

    Any assistance would be appreciated.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Form Advice Needed .....

    You'll probably need to capture the names to form variables and write/create child records from those.

  3. #3
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    That sounds a little over my head. Is that the only way? Or should I say, is that the easiest way?

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Form Advice Needed .....

    After re-reading your post I noticed.

    "So far the only way I've been able to enter six different people is to use an embedded browse, but that really doesn't work well "b"on a police report"/b"."

    If you are using the form as the printout I would suggest that you create a report instead. There is much more flexibility there.

  5. #5
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Form Advice Needed .....

    Forgot to check the html box...

    After re-reading your post I noticed.

    "So far the only way I've been able to enter six different people is to use an embedded browse, but that really doesn't work well on a police report."

    If you are using the form as the printout I would suggest that you create a report instead. There is much more flexibility there.

  6. #6
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    Well eventually it will have to be printed, but the purpose of my form is for DATA ENTRY. I will probably use the reports generator when it comes time to print.

  7. #7
    Member
    Real Name
    Ronald Fuchs
    Join Date
    Nov 2001
    Location
    Springfield, MO
    Posts
    35

    Default RE: Form Advice Needed .....

    Hey, I think the way you would get the result you are wanting is to add a number field to the child records and have it enter numbers one through six in those fields when the parent record is created, then display the records in numerical order on your form based on the number field, though you don't need to display the actual number field on your form. Don't know if I made this very clear, anyway it is just a thought.

    Ron

  8. #8
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    Hmmm interesting Ron, but how would I go about having the parent record automatically assign 6 numbers to the child record table each time a new report is started?

  9. #9
    Member
    Real Name
    Ronald Fuchs
    Join Date
    Nov 2001
    Location
    Springfield, MO
    Posts
    35

    Default RE: Form Advice Needed .....

    There are so many people who monitor this site who are so much smarter than I, hopefully some of them will jump in and improve on my suggestion. The way to get alpha to fill in the child records it seems to me would be to write a loop program in xbasic and put that in the onchange field event for the first field that is filled in on the parent form. In that way when a new form is started it would create the necessary child records.

  10. #10
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    The one problem I see with that method is that there will be unecessary records created with only a number in them for data, in the instances where the user has less than six people to list in that section/

    Seems like there must be an easier way, but I'm not nearly as well-versed in it as you or most of the folks on here.

    Anyone else have a suggestion? Tom Cone you listening? LOL

  11. #11
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default RE: Form Advice Needed .....

    Richard,

    I've been watching in hopes that what you're trying to do will become clearer. Unfortunately I'm still in the dark.

    Most designers would use a two table set. The primary table would contain facts about the incident. The linked one to many child table would contain facts about those involved in the incident (one person per record). A simple embedded browse would be used in a set based form to show a few of the key facts about each person. An OnRowDblClick event would open a companion form to show full details about each person, one person at a time.

    You've rejected this approach but haven't said why. Can't offer suggestions til I get a better fix on the problem. Sorry.

    -- tom

  12. #12
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    Sorry if I confused you guys, I guess my description of what I'm trying to do is not coming out to clear, and it looks like it may not be possible anyway.

    But just to clarify things I've attached a screen shot of what I wanted to the form to look like. If you look at the picture, you'll see the "parent" form in the first black frame. (Case Number, Date, Time, etc.)

    The next two frames contain fields from the child table, and would represent the first two of six locations for entries of "people" related to the incident. (Disregard the tabs for this demo.) This is how I wanted to form to look to the person filling it out, as it looks very similar to the "hand-written" versions of the same report, other than that fact that the hand-written version has six places to enter "people."

    Now as you can see in this screen shot, the name information for "Person 1," is duplicated in "Person 2" because I got the fields from the 'drag-n-drop' list and that just repeats the same record from the child table over and over.

    What I wanted to have was six blank records from the child table always visible on the form for the user to fill in. Of course the user may not always need all six records, in fact at times he may only need one, but the hand-written version has places for six, so I wanted the computerized version to look the same. As such, the embedded browse that I tried ended up looking very confusing, as it had fields running way off to the right of the form, to accomdate all of the necessary "person" fields.

    Tom, I really wasn't rejecting the embedded browse idea, I just didn't think it would look right on the form, although now that you talk about an OnRowDblClick event which would open up a companion form, that sounds like it may be what I'm looking for, I'm just not sure how to go about setting it up.

    Any assistance you or Ron could offer on how to set up an embedded browse that only shows a few basic fields about the person being entered, then bringing up a separate form which shows all of the additional details would be greatly appreciated.

    (I'm learning a little more each day.)

  13. #13
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    I just noticed that the screen shot doesn't come out too clear if you view it from internet explorer. For a 100% better view, download it to your computer and view in a photo program. (It's only 165kb)

    -- Rich

  14. #14
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default RE: Form Advice Needed .....

    Rich,

    Thanks. That helped a lot. There's no practical way to present six blank child table records on screen at the same time.

    The paper form you're emulating concedes blank space for unneeded "people" data. If the officer doesn't need it it just stays blank. This takes up space, but who cares.

    The paper form you're emulating concedes that no more than 6 "people" will be involved in the incident. What does the officer do if more are involved?

    To mimic the paper form, abandon the child table, and put the fields in the incident table corresponding to person1, person2, person3, etc. You'll have the same strengths and same weaknesses as the paper form. You waste disk space for unneeded "people" fields, and you are limited to a maximum of six "people" for any one incident. Just like the paper form. Doing it this way there's only one record open for edits. It contains incident fields and people fields (x 6).

    Personally, I think it would be a mistake to do this, and would recommend using an embedded browse as a navigation device, and the onrowdblclk to open a separate form for edits. Doing it this way your app can handle gracefully situations in which the number of "people" is different from 6.

    -- tom


  15. #15
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default RE: Form Advice Needed .....

    Richard,

    Stan Matthews first response at the top of the thread is a good alternative, but will require more work from you.

    Instead of putting any child table fields in the data collection form, you use a bunch of separately named variables, one group for each "person" involved in the incident.

    Your Save button could be scripted to examine the variables, and for each separate group, it could enter a corresponding new record in your child table.

    The reverse would have to be scripted also. When the user navigates to a new "incident" Alpha will have to retrieve the field values from all related child table records, so they can be assigned to layout variables and displayed to the user.

    Lots of work, but doable.

    -- tom

  16. #16
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    Tom I agree now that the embedded browse is the best way to handle this form. I really do not want to waste disk space, and want to keep all of my "persons" data in one table for easy recalling later on.

    If I sent you the form or posted it here, could/would you assist me with showing me how to do the embedded browse with the onrowdblclk so that it brings up the additional table data?

    Thanks

  17. #17
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    Whoops, I guess I should have posted this at the bottom of the thread for easier reading:

    Tom I agree now that the embedded browse is the best way to handle this form. I really do not want to waste disk space, and want to keep all of my "persons" data in one table for easy recalling later on.

    If I sent you the form or posted it here, could/would you assist me with showing me how to do the embedded browse with the onrowdblclk so that it brings up the additional table data?

    Thanks

  18. #18
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default RE: Form Advice Needed .....

    May I suggest you try it yourself first? If you get stuck then post a working model of the database here with instructions for us to follow to see the problem that holds you up. -- tom

  19. #19
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default RE: Form Advice Needed .....

    OK Tom, will do. Thanks

  20. #20
    Member
    Real Name
    Louis Ciarlo
    Join Date
    Oct 2005
    Posts
    18

    Default Forms

    I know the what you want to do.
    The problem is that you want a formfiller type of entry. The problem with that is if an Incident accurss that has the following:
    1. Three officers
    2. More than five persons involved
    3. Two Vehicles
    4. Stolen Goods
    5. Narrative.
    I believe in the regular form type system you had predefined boxes for one or two vehicles, possible complaintent, and the rest went into the short narrative on the form. If that wasn't sufficient you would go to a long narrative or supplemental report form.
    That idea does not help in a database type application when you are searching for persons, vehicles etc.

    What you must do is create a relationship between the main table which would include the incident number, date of reported incident, time of reported incident, location etc.....

    Then print out your report desginned as close as possible to your exiting form.
    The problem is that this report can be more then one page in length.
    When you start inputting a person you would to capture there name, address,
    Sex,DOB,race,ss#,etc...
    As you can see this takes up allot of space on any report depending on the the number people involved.

Similar Threads

  1. Advice/Help on Export needed.
    By PhilD in forum Alpha Five Version 5
    Replies: 4
    Last Post: 01-18-2005, 06:53 AM
  2. Advice needed
    By BRIAN GRAY in forum Alpha Five Version 5
    Replies: 8
    Last Post: 01-16-2005, 02:12 AM
  3. Backorder design advice needed
    By Pat Bremkamp in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-22-2004, 08:56 PM
  4. Network advice needed
    By Charlain in forum Alpha Five Version 5
    Replies: 6
    Last Post: 06-06-2003, 07:37 AM
  5. Upgrade Advice Needed
    By David LITTLE in forum Alpha Five Version 4
    Replies: 15
    Last Post: 02-15-2001, 12:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •