0

SELECT function

Hello,

which is the best way to identify records if the table as a below relation:

Table A link to table B, and table B link to table C.

I need to count records in table C based on a filter related to table A.

Thanks.

5 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    Which direction does the 1 to many go?

    TableA has a 1:N to TableB or TableA has a N:1 to TableB?

    TableB has a 1:N to TableC or vice versa?

    • rbennice
    • 1 yr ago
    • Reported - view

    TableA has 1:N to Table B, and Table B has 1:N to Table C.

    Thanks

    • Fred
    • 1 yr ago
    • Reported - view

    which table will the count formula be in?

    • rbennice
    • 1 yr ago
    • Reported - view

    I need to know how many records of TableC are related to a defined record in TableA.

    • Fred
    • 1 yr ago
    • Reported - view

    If you are in TableA and want to count the number of related records in TableC through TableB, you can do something like:

    count(TableB.TableC)
    

    If you are in TableA and want a formula to count the records in TableC that have a field the same regardless of the relationship to TableB, then it would look something like:

    let t := this;
    let x := (select TableC)[LinkText = t.Text];
    count(x)