Understanding Parent/Child flows: Passing variables/data possible?

Options

Gang – I've done lots of googling and such when it comes to parent and child flows, but I'm just not succeeding in wrapping my head around whether my use case is possible: I'm trying to move my monthly reporting from a very tedious and manual process (executing more than a dozen queries to about 25 different CSVs – one dozen for this FY, and rerunning the dozen again with comparison FY dates – then manipulating them in Excel) to PA.

My thought is to set up a parent flow that would ingest four dates as inputs: Current FY start-date, current FY end-date, then start- and end-dates for the comparison reporting period (usually last FY, but the beauty of PA is that the same process could be used for any comparison period! ?), as well as other variables that I'd like to pass to the child flows, such as the query variables like “RE” and “None”, etc.

I would then set up child flows for each of the dozen queries, with the input dates as <ASK> values, then have the flow manipulate things for me.

Yet I can't seem to figure out how to pass the parent variables along to the child flows. Any ideas?

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Kevin Fletcher
    calling a child flow require both parent and child flow in a Solution, otherwise, you are not going to get the “run child flow” action

    is this what you having problem with, not able to get the child flow action to come up?

    If not, please specify what issue you are having.

  • @Kevin Fletcher
    As Alex said, your Parent and Child flows will need to be in the same Solution as a starting point.

    If you already have a solution with your flows, the easiest way to pass variables to a child flow is to set them up in the child flow's trigger. If you select your trigger and click ‘Add an input’, you can set up as many input as you need.

    991090e8850a84698956138bb6361c87-huge-ad
    7b9d5890fed4925c935bb9f8aba7a019-huge-ad

    Once you've done this, when you go back to your Parent flow and select this child flow to run, it will ask you to provide values for all of the inputs you set up.

  • @Ben Regier @Alex Wong I'm successfully getting variables passed to the child! Next issue is a new topic: How does one pass <ASK> dates to the query? Was thinking I'd be able to do so in the Body of the POST request, but it's throwing the following error:

    {"type":"urn:blackbaud:ask-field-values-required","title":"One or more validation errors occurred.","status":400,"detail":"Filter field 0 requires corresponding ask values.","trace_id":"b939dfbb199b49f697ead50da0731a11","span_id":"3b08da812de0c793"}

    087ae46ae09f371dbd7b2fbcf69c66bd-huge-im
  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Kevin Fletcher
    this is one way to do get JSON of query for adhoc querying from saved query

    if you have Query in webview (not Query API), you can open the Query in webview and copy the json.. modify it for use too.

    d910edb79f2e32028de83518dad474d3-huge-im
  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Kevin Fletcher
    Just looked at the documentation for query execution by id and saw this:

    cb324135973e136cc556a42361244b69-huge-im

    I guess query by id does support “ask” now, but instead of property “filter_values”, it is “ask_fields”, which is an array.

    I would still prefer using adhoc query, but “ask” being supported is good

Categories