Forum Discussion

MikeTamoush's avatar
MikeTamoush
Qrew Commander
3 years ago

Pipeline workaround - 'is contained within'

How can I accomplish this in a Pipeline?

A- Search a table. Include a text field

that is a list of items (semicolon deliminator). This search yields a handful of results.

For each A:

B. Search a different table with this condition:
 

is contained within
.

Obviously that isn't a filter that exists. What ways can this concept be accomplished?



------------------------------
Mike Tamoush
------------------------------

8 Replies

  • There is a Contains filter available in a Search. Can you explain why it can't be used?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      You can do: Contains
      , but the reverse is not available.

      is contained within the
      .

      I think my solution may be to reverse the order of my 2 searches. At least that's all I can come up with.

      This essentially is regarding my other post. I had one i idea where I searched my subcontractors, all which have a field called 'missing dates'. So it might be like "1-1-2021; 3-1-2021'

      Then I search a dates table which just has dates listed. I want to say, search the date table for where the single date is contained within the missing dates field. 

      I don't think that's possible, but I think i can search the date table FIRST. Somehow limit the dates to a manageable amount, then for each date find a subcontractor where missing dates contains that single date. Then finish my pipeline. 

      That's my only idea so far

      ------------------------------
      Mike Tamoush
      ------------------------------
  • Hi Mike,

    If it is a semicolon delimiter you could try using regex, that is what I do for multi-select fields:

    Find All Matches to Regex:
    Text: {{yourfield}}
    Regular Expression:([A-Za-z0-9\s]+);​

    For each match, search for {{x.group_1}}

    ------------------------------
    Sean Connaughton
    ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      Thanks Sean.  Do you know if there are any good help documents on Regex? Ive never used it, and what you wrote looks a little like a foreign language to me :)

      I mean, I could just copy and paste what you have, but just trying to teach myself what it means.

      ------------------------------
      Mike Tamoush
      ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      Worked great thank you!

      ------------------------------
      Mike Tamoush
      ------------------------------
  • Hi Mike,

    This is what I used to get started, it is a really useful skill to have!

    Youtube Tutorial: https://www.youtube.com/watch?v=sa-TUpSx1JA
    Cheat Sheet: https://cheatography.com/davechild/cheat-sheets/regular-expressions/
    Mozilla Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet

    FYI, I think the last object in the text will not be found unless there is a semicolon after it. You could probably work it out with a "?" but I usually take the easy way out and just do the following in my text field.

    Example:

    Text: {{a.project_phases}};
    Regex: ([A-Za-z0-9\s]+);

    Notice the semicolon at the end of the Text will let the regex capture all objects.

    ------------------------------
    Sean Connaughton
    ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      Thanks for the info. I'm a bit confused though.

      If what I want is a condition that says, Field A is contained within Field B (from another table)

      In pipelines I can choose, Field A - match regex - xxxxxxxxxxxxxxx (type expression).

      So If I type the Regex experssion you posted, how to I reference Field B? Where does the text expression go?

      ------------------------------
      Mike Tamoush
      ------------------------------
      • SeanConnaughto1's avatar
        SeanConnaughto1
        Qrew Cadet
        I should have mentioned in one of my previous responses that you will need to use the text channel:





        I just blocked out my Pipeline account details, but I hope that helps. You would just need to change the search query to whatever field you need to check on. E.g. query: Field A contains {{b.group_1}}

        ------------------------------
        Sean Connaughton
        ------------------------------