This topic is locked

Link Master Table to two fields in child table

8/12/2014 8:31:39 AM
ASPRunnerPro General questions
Y
yahia author

Hello

I have two table

1-Team table with fields:
-TeamName

-Team players
2- The Matches Table with fields as follow:

  • MatchNo

    -date

    -Team1

    -Team2

    -ScoreTeam1

    -ScoreTeam2
    Now i want the master table TEAM to show results from Matches Table when TeamName in Team table is equal to Team1 or Team2 in Matches table
    that means that one field of the master table will be linked with two fields in child table

    Is that possible ?

Y
yahia author 8/13/2014



Hello

I have two table

1-Team table with fields:
-TeamName

-Team players
2- The Matches Table with fields as follow:

  • MatchNo

    -date

    -Team1

    -Team2

    -ScoreTeam1

    -ScoreTeam2
    Now i want the master table TEAM to show results from Matches Table when TeamName in Team table is equal to Team1 or Team2 in Matches table
    that means that one field of the master table will be linked with two fields in child table

    Is that possible ?


Ok if this is not possible i am asking it is possible to show TeamName in the first table (team) in list page as hyperlink to the list page of MATCHES table where TeamName of Team table is euqal to Team1 or Team2 in Matches table

I feel it should possible if we set TeamNake in Editor as custom but i dont know how the code would look like

Please Help

Thank you

G
gonzalosb 8/14/2014

Hi Yahia,

i think what you try to say is that need to show results depending of the team user logged?

if user1 from team1 log in can see only team1 results?
or no mates who logs can see bough results?
eider way can be done in different ways
if non of this is what you need, can you post pictures (even edited) to show in more detail what you need?
i may can help you

Y
yahia author 8/15/2014



Hi Yahia,

i think what you try to say is that need to show results depending of the team user logged?

if user1 from team1 log in can see only team1 results?
or no mates who logs can see bough results?
eider way can be done in different ways
if non of this is what you need, can you post pictures (even edited) to show in more detail what you need?
i may can help you


Hi gongzalosb

thank u for ur reply

i will tro to explain
No it has nothing to do with user or security level

I will try to explain more lets say i have only 2 table
1- table one TEAM with the following data:
Id teamname

1 brazil

2 germany

2 france

4 italy

5 spain
2- table 2 matches [size="2"]with the following data:[/size]

[size="2"] MatchNo date team1 goalsteam1 goalsteam2 team2[/size]

[size="2"] 1 2014-08-15 brazil 2 0 germany[/size]

[size="2"] [/size][size="2"]2 2014-08-15 france 1 4 brazil[/size]

[size="2"] [/size][size="2"]3 2014-08-15 france 3 1 italy[/size]

[size="2"] [/size][size="2"]4 2014-08-15 spain 2 1 germany[/size]
so what i want is so simple just that the teamne in table 1 be shown as hyperlink to the the table 2 where team1 or team2 are equal to teamname

G
gonzalosb 8/15/2014

ok , let me see if i understud.
if i click on BRAZIL on table 1 will show me on table 2 records that only have a BRAZIL on the match eider on team1 or team2.

so base on your example i will see only:



1 2014-08-15 brazil 2 0 germany

2 2014-08-15 france 1 4 brazil


if is that, you need to create a table relation on the first page of the ASPRunner, are videos here on how to do it:

http://www.xlinesoft.com/tutorials/masterdetail2.htm

http://www.xlinesoft.com/tutorials/ManytoMany.html
also depending on the datarelation result you may need to hide the unwanted fields:

http://xlinesoft.com/asprunnerpro/docs/hide_buttons_in_some_rows_of_datagrid.htm
let me know if need more help...
to see all the video tutorials available:

http://xlinesoft.com/asprunnerpro/tutorial.htm

Y
yahia author 8/15/2014



ok , let me see if i understud.
if i click on BRAZIL on table 1 will show me on table 2 records that only have a BRAZIL on the match eider on team1 or team2.

so base on your example i will see only:



1 2014-08-15 brazil 2 0 germany

2 2014-08-15 france 1 4 brazil


if is that, you need to create a table relation on the first page of the ASPRunner, are videos here on how to do it:

http://www.xlinesoft...sterdetail2.htm

http://www.xlinesoft...ManytoMany.html
also depending on the datarelation result you may need to hide the unwanted fields:

http://xlinesoft.com...of_datagrid.htm
let me know if need more help...
to see all the video tutorials available:

http://xlinesoft.com...ro/tutorial.htm


Yes this exactly what i need but how do i create a table relation and in my case what fields i will contain Thank u again

G
gonzalosb 8/16/2014

the relation should be:
table1 - table2

teamName - Team1

teamName - Team2

Y
yahia author 8/16/2014



the relation should be:
table1 - table2

teamName - Team1

teamName - Team2


hELLO Gonzaolsb

Thank u for keeping helping me

But when i make the relation
table1 - table2

teamName - Team1

teamName - Team2
It doesnot return any results

and when i make it
table1 - table2

teamName - Team1
it retuns results but not including team2
Thank

G
gonzalosb 8/18/2014

no idea why doesn't show bough tables
what version of ASPRunner you have?
try to create only this section on a new project to see if make any difference.
please post pictures of the result or any error the project give you.

Y
yahia author 8/18/2014

<br />no idea why doesn't show bough tables<br /><br />what version of ASPRunner you have?<br /><br />try to create only this section on a new project to see if make any difference.<br /><br />please post pictures of the result or any error the project give you.<br />

<br /><br /><br />

Thank u so much

Here i think u did not yet get my point

The relation is from one field in table one to 2 fields in table 2

there is not third table

And it shows result only that include the raltion from ! field and ignre the second field

I will try to send pictures


">

image 2

Y
yahia author 8/18/2014



<br /><br /><br />

Thank u so much

Here i think u did not yet get my point

The relation is from one field in table one to 2 fields in table 2

there is not third table

And it shows result only that include the raltion from ! field and ignre the second field

I will try to send pictures


">

image 2


Y
yahia author 8/18/2014

image 2