Forum Discussion

BenKrieger's avatar
BenKrieger
Qrew Member
4 years ago

Getting a query as a delimited text list

I have two tables Pieces(Child) and Pallets(Parent) that are related. I am trying do a query that will allow me to get a list of all of the pieces related to a project where a Quality Control Checkbox is true in a character delimited list and then post that list to a text field in all of the Pallet records related to that same project.

As of right now I am trying to do this in a pipeline using a json webhook request and I imagine it is possible with jinja, but I'm unsure of the exact syntax to use for the query to get the output I want. The body of my webhook request is as follows:

{"to": "brctf4aiw", "data": [{"76": {"value": "
     {"query": {
          "tableId": "brcfcrnpx",
          "filter": "{15.EX.{{a.bid_project_number}}}AND{50.EX.'True'}",
          "fields": [6]}
     |trim|list}"
}}
]
}
------------------------------
Ben Krieger
------------------------------

5 Replies

  • Ben,
    I think that you are saying that you have Relationships where One Project has Many Pallets and One Pallet has many Pieces.

    Why not just make a combined text summary field to summarize the unique pieces up to Pallets and then summarize that field again up to Projects?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • BenKrieger's avatar
      BenKrieger
      Qrew Member
      The relationship structure of my app is Projects have many work tickets, which have many travelers, which have many pieces. Projects also have many pallets which have many pieces. I was summarizing all of the pieces that passed final QC and weren't already on a pallet up through travelers, work tickets, and finally to projects to get a list of all the pieces that were final approved and not palletized for each project and then passing that list as a lookup to the pallets table so that each pallet record could use that list for data validation. I need a way to get that Quality Control information from the Piece records to the pallet records so that users will not be able to associate a piece that is not final approved by QC with a pallet.

      A combined text field was my initial solution, however combined text fields are treated as multi-select fields which have a maximum of 20 outputs. The problem with this is that the number of pieces that are final approved by Quality Control and not palletized could easily be over 20 pieces for any given project at any given time. Using a combined text field would mean that for any project where this is true the combined text field would return an incomplete list.

      ------------------------------
      Ben Krieger
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Combined text summary fields will return the first 150 unique children.  So much more than 20.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------