1

Pulling data from linked table

Thanks to you all, I've learned quite a bit. I have a table called Players and another called Roster. I have linked Roster > Players (name). When I choose the appropriate Player, I want the Roster table to also display the 2 fields; Salary and Points from the Players table. I began using formula fields but not sure how to make that work. What is the best solution?

12 replies

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    @Doug,

    Not following the statement "I want the Roster table to also display the 2 fields; Salary and Points from the Players table.".  The Roster table has a zero to many relationship with Player table.

    rosterTbl

    What you can do.. is look at it from the Players table.. and add the Roster to a view of the Players.

    roster

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    Thank you Mconneen, I didn't explain well enough. In your example, Your Roster table has the information I need, where I call it the Players table. What I want to do is build a roster from that table. Where I would choose "Player 1", and when I do it would also display his salary and pts... in what I call the Roster table. (This db is for a fantasy football project where I would build different rosters weekly.) That said, I want to build the Roster table from the Players table. If I'm still vague I'll try and come up with a way to better explain. (It's not you, it's me.) :)

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    How's this? (Is what I should have done in the first place.) I want to build this:

     

    Screenshot 2020-08-05 18.16.06

     

    From this:

     

    Screenshot 2020-08-05 18.15.47

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Do you want something like this, or a different related table for each position, or something else?

    Rosters-Players

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    Yes sir and then I'll keep a running total of the players I select. I appreciate your help Dean.

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @Doug.. and it sounded like you wanted to change / create a new roster per week.. 

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    Yes sir. That is correct. 

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    In addition if this helps, and I wish I would have thought of this sooner, it works perfect with VLOOKUP in Excel.

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Oh, you want to do a lookup that pulls data from the Players table to unrelated fields in the Roster table? Similar to selecting from a Choice field, except the choices are records from the Players table? I just posted four screenshots from a barebones solution that does that, at:

     

    https://ninox.com/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/comment-pouvoir-recuperer-les-donnees-dun-enregistrement-anterieur-dans-un-nouvel-enregistrement-5f2b37152f43b83d780dd389?post=5f2c38e12f43b83d780dd3bc&page=1

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    With this approach, the solution could look like the screenshot below, with the Players reference field on the far right acting simlar to a Choice field, with its choices coming from the Players table. The unlink icon could be clicked and then another Players record could be selected from the list of Players. This would activate the "Trigger after update" property of the Players reference field:

    Position := Players.Position;
    Player := Players.Player;
    Salary := Players.Salary;
    Extrapoints := Players.ExtraPoints

    I am not saying that this is the best solution. It would just be similar to the lookup action you mentioned.

     

    Roster-Player Lookup

    • Doug_Miller
    • 4 yrs ago
    • Reported - view

    Thank you so much. I had talked myself out of using a choice field and then wasn't sure what to do. What a great help you've been.

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    The below arrangement with three tables seems to work. The "Players" and "Lookups" tables have the same columns.

    Rosters-Players-Lookups

Content aside

  • 1 Likes
  • 4 yrs agoLast active
  • 12Replies
  • 1400Views