Custom Field as Flow Output

Options

Are there any instructions someone could point me to as to how to include a specific Custom Field/Attribute into an output Word document? I see the List Custom Fields Action, but not sure how to limit it to a specific custom field.

Comments

  • Are you wanting to get the custom attributes of a gift?

  • Hi Reuben,

    I'd suggest using the “List Gift Custom Fields” action, and then using “Filter Array” action.

    On the Filter Array, use the output of List Gift Custom Fields in the “From” category.

    For the two fields below it:

    The left field use the expression box to enter: item()?['category']

    The right field use the name of the Custom Field you want. This will output an array with all the matches, you will probably just have one. To get the output into the word document, you'll need to use the expression box to enter:

    first(body('Filter - Name of your filter action'))?['value']

    or

    body('Filter - name of your filter action')?[0]?['value']

    Just make sure to replace the text in the single quotes ‘Filter - Name of your filter action’ to the exact name of your filter action. You may also be able to use the expression box to type first() and then use the dynamic content tab to choose the filter action to fill in the parentheses. You will still need to add the ?['value'] afterwards in the expression box.

  • Just adding a picture to what @Evan Webb shared. Mine also only has one value and I ended up storing it in a variable to add to use with a switch later in the flow.

    b86da12280ac00c637f930558fa950a7-huge-im
  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Tenth Anniversary Kudos 3 Name Dropper Participant

    Reuben Schmitz:

    Are there any instructions someone could point me to as to how to include a specific Custom Field/Attribute into an output Word document? I see the List Custom Fields Action, but not sure how to limit it to a specific custom field.

    Hey Reuben, check out this post for additional Addressees and Salutations with video. It's a similar concept. Dan's screenshot shows the final result for specifically Custom Fields. https://community.blackbaud.com/forums/viewtopic/586/58351

  • Evan, apparently something I am doing is still incorrect - do you see what it is by chance?

    Error message: Connect to include a valid reference to ‘05_Congregation’ for the input parameter(s) of the action ‘Filter-array’.

    The Custom Field Category is “05 Congregation” and I want to display the accompanying Value. this is what I am using:

    8df158804d7d38d970ef09a5006f665c-huge-im

    Or in basic mode:

    2c7b4a7e202bd91745d8fd45c0387d26-huge-im
  • I'm using the List Constituent Custom Fields connector but the below process would be the same for any of the custom fields/attributes. When the List Custom Field action runs, it's going to return a list of JSON objects (like what I've listed below). Every attribute will have the same schema. So if you had more than one attribute for a constituent, it will be this format repeated. The easiest thing to do is to add a Parse JSON action after the List Custom Field action and parse what's returned. In the example below, I put the output into am HTML table but you can output the values anywhere.

    One important thing to note: the key, value pair for value returns another object (key, value pair) so you cannot access the true value of the attribute by just using attribute[0][value]. You'll need to go something like attribute[0]['value']['y'].

    If you have any issues, I'm happy to help anyway I can.

    [

    {

    "id": "88237",

    "category": "Auction Participant",

    "comment": "",

    "date_added": "2022-02-23T09:45:15.327-05:00",

    "date_modified": "2022-02-23T09:45:15.327-05:00",

    "parent_id": "33288",

    "type": "FuzzyDate",

    "value": {

    "y": 2022

    }

    }

    ]

    bdcd9b361a44b0690ac5e11687bc33be-huge-im

    9eca3bcf87b778908cb11b9650bce67c-huge-im

    14b621d681cc509339c6a8d599eb31b5-huge-im

Categories