Alpha Video Training
Results 1 to 7 of 7

Thread: Set Structure

  1. #1
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    76

    Default Set Structure

    I am having real difficulties in setting up a short term loan application, and I am beginning to think that it is due to the way I have structured the main set. I followed the AlphaSports application as a base, and I am now thinking that the structure should have the Customer table at the head.

    One of my main problems is that I have an embedded browse on a form. Despite trying various "solutions" over the weeks, and having the set using referential integrity, showing a customers historical transactions is a bit hit and miss - adding a new record often does not get linked to the browse - yet looking at the transaction table shows each record with an incremental agreement number and the right customer in the right field.

    The current set structure is attached, and I am wondering if anyone has thoughts on the merits or principles of structures - this surely is the key to the success of any application.

  2. #2
    "Certified" Alphaholic
    Real Name
    Jeff Kletrovets
    Join Date
    Oct 2005
    Location
    Columbus, OH
    Posts
    1,135

    Default Re: Set Structure

    David

    I think a little more information is probably in order. Your table definitions, the actual screen shots showing the linking information (one to one / one to many / etc.) Even though it is possible to tell whether the linking is one to one or one to many from what you provided we can't see the underlying way you have things set up. Your best option is to make a copy of your app and post a sample here zipped up so folks can have a first person look at things(Just delete any sensitive info).

    Regards,

    Jeff
    Last edited by jkletrovets; 06-08-2007 at 02:46 PM.

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

    Default Re: Set Structure

    David, I agree with Jeff, more information is needed before meaningful advice can be offered. Tell us about the application and assume none of us know anything about "short term loan databases". In the course of your narrative answer the following questions:

    1) Is each customer given a unique identification number?
    2) Do customers potentially have more than one loan agreement? Does each loan agreement get its own identifier? Is each unique?
    3) Does the app track payments, credits, writeoffs, for each loan agreement? Is each "transaction" given a loan agreement number so it can be linked to the right loan agreement?
    4) Do customers have transaction histories, or do loan agreements?

    -- tom

  4. #4
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    76

    Default Re: Set Structure

    Thanks for the responses.

    I am really aware of the generosity of many of the members here, and am conscious that at times some posters try to get a fully blown application for free and with little input.

    For this reason, and that my application at present is still pretty basic compared with some zipped files I have seen from others, I didn't post it.

    So, as requested, attached it is - and I bet you'll work out from the layout whose knowledge I have used already as a base :-)

    The basic application is to account for and keep track of short term loans of 31 days, and these are sometimes rolled over on payment of a fee for additional periods of 31 days. A customer may have more than one current agreement at any one time. If an agreement is repaid early, discount is given. e.g. loan of 200, they get 174 cash. if repaid early, say halfway though, they only need to repay 187.

    To answer your questions, Tom,

    1) Is each customer given a unique identification number?
    2) Do customers potentially have more than one loan agreement? Does each loan agreement get its own identifier? Is each unique?
    Yes to all, and can be "unique" only in amount and more rarely percentage.

    3) Does the app track payments, credits, writeoffs, for each loan agreement? Is each "transaction" given a loan agreement number so it can be linked to the right loan agreement?
    My intention is that eventually there will be full tracking, and as customer will sometimes have more than one current agreement, a figure as soon as their record is shown that will give total current exposure for the company.

    At present it is pretty basic, with the fields tr_FeeIf used for the agreement as the contract interest and Tr_Feepdf for the fee actually levied.

    4) Do customers have transaction histories, or do loan agreements?
    I have assumed that the transaction histories will be customer based.


    I have tried an embedded form in the transaction menu, but the agreement number wouldn't increment, but it did increment if I called the subform from a button. I have tried various combinations of tick boxes in the field rules to ensure incrementation, but this is hit or miss. I'm pretty sure that I am missing some xbasic code - however my knowledge of this is limited, though I am going through the tutorials and know more than I did a month or so ago (like I didn't know what a "dim" was!!).

    In a nutshell, I suppose I am trying to do a flying application when at present I am limited to working with a zimmer frame. I'm happy to keep working at it (I have to - there isn't anything in the market that I can see that will do what I want) but some input would really be appreciated.

    David

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

    Default Re: Set Structure

    It may be a mistake to think of customers having transactions. Better to think of customers having loan agreements, and loan agreements having transactions. This permits you to easily produce reports that show all the transactions for a loan agreement, as well as all transactions for a customer. The transactions table would hold foreign keys linking to both customer and also loan agreements.

  6. #6
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    76

    Default Re: Set Structure

    Quote Originally Posted by Tom Cone Jr View Post
    It may be a mistake to think of customers having transactions. Better to think of customers having loan agreements, and loan agreements having transactions. This permits you to easily produce reports that show all the transactions for a loan agreement, as well as all transactions for a customer. The transactions table would hold foreign keys linking to both customer and also loan agreements.
    Thanks Tom,

    I see the logic for this, and I guess the basic set structure for this would be as attached.

  7. #7
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    76

    Default Re: Set Structure

    Pleased to say that my payday loan application is taking shape after many hours of try this, try that.

    The customer side is quite usable, though the form is pretty rough and needs more time to tidy it up. Also, it lack a "salutation" field for writing personalised letters from boiler plates that are set up.

    The actual transaction side has been the biggest headache, but comparing to what I did just a month or so ago, my learning curve has grown significantly.

    The set structure and related tables are the key - and were wrong at the start. This is so important - trouble is, a newbie like me knows what they want to achieve, but doesn't know how to get there until they climb a few steps and can see over the parapet. Thanks Tom for your pointer on set structure. I haven't developed the transaction within agreement side yet, as I thought it would be a bridge too far - I want to get the basics working first!

    So, attached is the current status of my application with some live data (I have de-personalised all customer details, of course). I am learning all the time but would appreciate any input to speed up my learning curve.

Similar Threads

  1. set structure theory???
    By Alan Lee in forum Alpha Five Version 6
    Replies: 1
    Last Post: 03-13-2005, 06:36 AM
  2. Set structure causes A5 to lock up
    By brett s in forum Alpha Five Version 5
    Replies: 2
    Last Post: 12-19-2004, 10:50 AM
  3. Copying a set structure
    By Leo Cohen in forum Alpha Five Version 6
    Replies: 3
    Last Post: 09-07-2004, 10:29 AM
  4. help with set structure
    By MIKKI BREAUX in forum Alpha Five Version 5
    Replies: 3
    Last Post: 12-12-2002, 06:13 PM
  5. Report Design and Set Structure
    By jwolfe11 in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-21-2001, 06:07 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
  •