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 28 days ago
    Hi All,
    I need help in one of my QB application. Their are two tables in which I build relationship and I want a field from Child table should update automatically a field in parent table when child record is updated.  

    I used   URLRoot() & "db/" &[_DBID_MONTHLY_TOTAL] & "?act=API_EDITRecord"URLRoot() & "db/" &[_DBID_MONTHLY_TOTAL] & "?act=API_EDITRecord"& "&apptoken= ban3pyfbjzu76bbzmpgrcb99rbb6"& "&_fid_14=" & URLEncode([Date])& "&disprec=1") formula but it didn't worked.  Can someone please help me with it.

    ------------------------------
    gaurav tugnayat
    ------------------------------


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

    Posted 25 days ago
    Hi Gaurav - 

    Have you considered utilizing Automations for this update, instead? Might be easier to set up.

    For your formula above, is it a Formula URL button? If so, there are a few things you need:
    1. You have this line in there twice: URLRoot() & "db/" &[_DBID_MONTHLY_TOTAL] & "?act=API_EDITRecord"&
    2. You need to indicate the Record ID# of the parent you're editing (see line 4 below): "rid=" & URLEncode([Related Parent Field Name])
    3. Include a redirect for where you want the user to land after the API call is made (see line 8 through 12 which will take them back to the child record)  with &rdr=

    Your final formula would then end up like the below (where Related Parent Field Name is the numeric relationship field that holds the Record ID# of the parent record):

    URLRoot()
    & "db/"
    & [_DBID_MONTHLY_TOTAL]
    & "?act=API_EditRecord&rid="
    & URLEncode([Related Parent Field Name])
    & "&_fid_14="
    & URLEncode([Date])
    & "&rdr="
    & URLEncode(URLRoot()
    & "db/" & Dbid()
    &"?a=dr&rid="
    & [Record ID#])

    ------------------------------
    Bree Mackey
    ------------------------------



  • 3.  RE: How to relate Date filed from child table to Date field from parent table

    Posted 25 days ago
    Hi Gaurav: 

    If you want the date field of the child table to go up and change a field on the parent table, you could do it with an automation.

    See Video:
    https://www.youtube.com/watch?v=fgwAiRuWnCI

    You could also create a summary field that looks at the child date field of all the child records and gives you the MAX Child Date.

    ------------------------------
    Kirk Trachy
    ------------------------------