Discussions

Expand all | Collapse all

How to relate date filed from child table to date field from parent table

  • 1.  How to relate date filed from child table to date field from parent table

    Posted 30 days ago
    Hi All,
    I am working on a application in QB. their are two tables named "SLA Region" and "SLA Monthly Total". The first table has region wise record and the second table has total of 30 days. Both the table are related with each other. "SLA Region" is child table and "SLA Monthly total" is parent table. 

    I just want to get the date from "SLA Region" table and reflect it on "SLA Monthly Total" table. How can I do that. I tried making it lookup field but it does not work and also I tried to use the below formula.

    URLRoot() & "db/" &[_DBID_Table name] & "?act=API_EDITRecord"URLRoot() & "db/" &[_DBID_MONTHLY_TOTAL] & "?act=API_EDITRecord"& "&apptoken= Application token"& "&_fid_14=" & URLEncode([field name of child table])& "&disprec=1") 

    Can some please help me get the expected result.

    ------------------------------
    Gaurav Tugnayat
    ------------------------------


  • 2.  RE: How to relate date filed from child table to date field from parent table

    Posted 29 days ago
    Gaurav,

    The parent table SLA Monthly can have many child records in the SLA Region table.   Are you trying to get the value of the date field in the SLA Region table?   

    If you want to know the value of the very first child record or the very last child record, you can create a reverse relationship to populate it in the parent table.

    Create a Summary field on the Record ID # for the SLA Region


    Pick Minimum or Maximum dependent on your criteria.

    Now create a new relationship between the tables but make SLA Region the Parent and pick the field you created above as the reference field.  Do not let it create a new field called Related SLA Region

    In the new relation ship you can use Date from the SLA Region as a Look Up field in the SLA Monthly table.

    Here is what your table structure will look like


    I did the minimum value in this example
    If you choose Maximum then every time a new record is added to the SLA Region table, the value in the SLA Monthly table will change to reflect that.




    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------