Method Community

 

Table Relationships (How Do I)

Last post 08-21-2009 8:38 AM by Joe. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-19-2009 11:41 AM

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Table Relationships (How Do I)

    Hello.

    My Goal:

    To create a relationship between the method Customer table

    and my custom Contacts table, such that, a grid added to the

     tab in the "Customer List" edit screen will display all

    contacts (from my Contacts table) that have the same

    CustomerName field value as the current customer

    selected via the default Customer grid already on screen.

    Additional Question(s):

    What exactly is the "Add Linked Field" option for when editing table fields?

    Can It help me with my goal?

    How is it used / useful?

    Concluding Info:

    This is all based around database design for maintaining data integrity and accessibility.

    My hope is that the relationships will work similar to those found in Microsoft Office Access.

    Any assistance is always appreciated.

    Thank you for your time / effort.

    ~Joe

     

  • 08-20-2009 11:47 AM In reply to

    Re: Table Relationships (How Do I)

     Hey Joe,

    Welcome to the forums!!

    Let's get these questions answered for you, we will start with creating a relationship between 2 tables. If you want to display information from 1 table on another table, you need to create a relationship between those 2 tables. In order to do this you can open up your contacts table, create a drop menu that is based off of your customer table. This will create a relationship between the contacts table and the customer table. The relationship is needed before you can use a linked field. This takes us into our next question;

    What is  "Add Linked Field" used for, and how is it helpful. A linked field is when you have a field from 1 table, show on a screen that`s based off a different table.

    For example; you have 1 screen that lists client names, built off of the customer table. Then you want to display the number of activities this client has. The activity screen is not based off of the customer table, so the linked field allowed us to link the two tables and share the field, by adding a dropdown(creating our relationship) to the activity table referencing the customer table.
    In conclusion, using the linked field allowed us to make reference to the customer table from the activity table which otherwise we wouldn't have been able to do.


    This should help explain it a bit better for you.

  • 08-20-2009 12:25 PM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Table Relationships (How Do I)

    Ok.

    So it seems that creating a relationship via a dropdown to a unique value in the corresponding table allows me to select any item from that field through the dropdown. I would assume making sure that the dropdown field cannot contain typed-in values not listed in the related table will require validation rules set on the field.

    As for the hard part hehe :) ,

    we're obviously going to be getting down n' dirty with grid setup/operation. I'm doing what I can here as far as testing / fiddling / observing grids on method tables. I'm looking over other posts on grids in hopes to smooth over my understanding of whatever you have for me. I would like to point out that a grid not based off the same table as the screen does not seem to appear in the list of tables under the Action:Refresh Grid.

    Anxiously awaiting any tips toward grid development =)

    ~Joe

  • 08-20-2009 2:27 PM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Table Relationships (How Do I)

    Hey Ryan,

    How is the grids & actions info comeing along? I'm at a bit of a customization stand still. I'm very dedicated to learning new material and do my best to teach myself what I can, but this is definitely an area that requires detailed documentation / assistance.

    Looking forward to your next post.

    Thx,

    ~Joe

  • 08-20-2009 3:05 PM In reply to

    Re: Table Relationships (How Do I)

    Hey Joe,

    I am looking into the detached grid not working with the Refresh Grid action. I will post an update as soon as I have one. If you have any other questions please post them.

  • 08-20-2009 3:32 PM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Table Relationships (How Do I)

    The refresh comment could merely be my lack of know-how with the grids.

    Which is why my only question right now is the same as my original goal/post.

    1) After dragging a new grid onto the screen, how can i set it up so that it will pull from my custom table.

    2) What steps/actions are needed to cause the grid to show a list of contacts (from my table) that have the same CustomerName field value as the customer currently selected in the Customer List "Existing Customers" grid.

    I set up a relationship between contacts and customer by adding a dropdown to contacts based off the "CustomerName" field in customer.

    I now need to set up the grid (that i already inserted into the 'Customer List' screen, in its own tab/section via the screen editor).

    If anything I ask is vague or you need more info about what I'm trying to do, don't hesitate to let me know.

    I'd really like to see this customization up and running asap. I don't think it seems that difficult. It is more an issue with learning how to get method to do it.

    I'm sure you are all under alot of pressure with desired instructions / functionality and appreciate your time/effort.

    Thx,

    ~Joe

    ----

    If we really need to set up a consulting time to get this wrapped up, will that cost the company anything or do I just have to set date/time up with you and that's all?

     

  • 08-20-2009 4:46 PM In reply to

    Re: Table Relationships (How Do I)

    Hey Joe,


    So about the grid not showing in the action "refresh grid" it’s just a user error. I tested this out a lot and its working, double check your grid names by looking at the caption under the grid wizard. This slipped past me at first and I thought you had found something. After going over this again, I noticed that I missed renaming the caption on this grid.


    As for how to get a grid to pull from another table. First you need to create a relationship between your table and the customer table. Once you have created that relationship, edit your grid and in the 1st step of the grid wizard, you will be able to select your custom table from the drop menu.


    Your second question is something advanced, and either will take time to learn or you can have your business consultant do the customization for you.


    To get you started on it, add a select column into the grid. This is where you will need to put some "if" statements to filter your grid

  • 08-20-2009 4:56 PM In reply to

    Re: Table Relationships (How Do I)

    Hey Joe,

    I just wanted to let you know that if you wanted some 1 on 1 training, our consulting fee is 125.00 per hour.

    If you wanted to look at some of our customization packages then check them out here.

     

  • 08-21-2009 8:38 AM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Table Relationships (How Do I)

    Hey Ryan,

    I am working on the grid now.

    Wanted to say thanks for pointing me in a good direction.

    Ive got a grid up and running. I havent tried to put all the functionality that I want into it yet but I wanted to fill you in on how I got all the contacts of a given customer to show in the list.

    Since the screen i am using is based off the Customer table and Customer is related to Contacts through the "FullName",

    under Step 3 of the grid properties (filters / views) i set the "CustomerName" field in my grid to be equal to the "Screen::CustomerName". Which, for this situation, creates the desired list of contacts with the selected customer.

    Still working on some other things and hoping to better understand the different actions. Bring on the webinars!!

    Am looking forward to working with you again =).

    Thx,

    ~Joe

     

Page 1 of 1 (9 items)