Forum Discussion

BaileyDesormeau's avatar
BaileyDesormeau
Qrew Member
6 months ago

Is it possible for the embedded report on a form to be filtered when adding a new record

Good morning,

I have a request to have an embedded report on a form be filtered to show assets that are only on the related mission that we are creating the BOL for. I am thinking that when you are adding a record, in this case, you are unable to have the embedded report already filtered because the record id is not created until after the save. Logically however i thought it was possible because when the record (BOL) is created, there is a mission no, which is on the BOL that i am creating, and their are assets that are already assigned to that same mission. However the embedded reports lists all, and not simply the assets that are on the same mission.

Thanks in advance,



------------------------------
Bailey Desormeaux
------------------------------

3 Replies

  • Those embedded reports work how they work on the record needs to be saved before the report will be properly filtered.

    However there is syntax available which I could help you with where you would push a Rich Text formula button and it would save the record and re-display the record in edit mode.

    The best practice for New Style forms which seem to be not to show the embedded report in Add mode.  



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • BaileyDesormeau's avatar
      BaileyDesormeau
      Qrew Member

      That sounds like an interesting solution. I would love to see how it would work!

      I just thought of a follow up question, the report currently filters by the related field so its matching the BOL ID (key field) with the related BOL (reference field) in the other table and only selecting those records. is it possible to base the filter off of the mission that is on the BOL? I tried something similar to a solution you posted on another discussion and it did not work for me, where i use a field on the parent table (BOL, Mission No.) then i lookup that field on the child table, then i filter the records by  BOL, Mission No equals the value in the BOL Mission No. Lookup field. I might have misunderstood your idea on the solution but it seemed logical to me, however did not work for me.



      ------------------------------
      Bailey Desormeaux
      ------------------------------

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Try this as a Formula Rich Text field.

         
        var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
         
        var text URL = URLRoot() & "db/" & Dbid() & "?a=er"
        & "&rid="& $RID;
         
        "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #117a39; border-radius: 5px; color: #FFFFFF; display: inline-block; padding: 4px 4px 4px 4px; width:140px; text-align: center; text-shadow: none; border: 2px solid #0863f5; font-size: 12px \"href='"
        & $URL
        & "'>Save and Continue</a>"



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------