Discussions

 View Only
  • 1.  Hyper linking field

    Posted 09-20-2017 00:46
    Normally as a result of summary fields created in a parent table, you can hyper link it which then takes you to the right child field. But in cases when this summary field is also being looked up from a different child table, clicking on the field brings you to the parent.  Is there s a possibility that hyper link could take me back to the table where this value originally came from?  


  • 2.  RE: Hyper linking field

    Posted 09-20-2017 15:47

    Hi Arshad. The hyperlinks in those summary fields encode a set of query parameters to retrieve and display the related child records. You could accomplish what you're trying to do in a child table that looked up the summary field if you create a formula text field in the child table where you want the hyperlinked summary field to appear.

    Imagine there is a Purchase Orders table that has child records in an Items table. The Purchase Orders table summarizes a count of items as [# of Items], and each record in the Items table looks up the summary field from the parent record as [Purchase Order - # of Items].

    In the formula below I use variables because that's much easier than escaping a lot of quotation marks.

    // This variable points to the child table, where this formula field resides  var text url = URLRoot() & "db/" & [_DBID_ITEMS];    // The following variable assembles the Quick Base query parameter  var text query = URLEncode("{'8'.'TV'.'" & [Related Purchase Order] & "'}");    // The actual formula displays the summary field from the parent table inside a hyperlink that matches the built-in query from the parent table  "<a href='" & $url & "?a=s&query=" & $query & "&opts=disprec&isDDR=1'>" & [Purchase Order - # of Items] & "</a>"

    I hope this is helpful.

    PHILLIP DENNIS, CMA
    Principal | Watkyn LLC
    (954) 900-6690 | www.watkyn.com