Flow Failing with Null Values in Major/Minor Field Using the Create Education API

Hello Sky Community,

I am working on creating education records and I'm hoping someone can offer me a shortcut. ?

When adding an education record using the Blackbaud API, I need to account for multiple combinations of major/minor fields. Examples include:

  • 1 major, no minors
  • 1 majors, 1 minor
  • 2 majors, no minors
  • 2 majors, 1 minor, and so on.

The challenge I’m facing is that the expression I’m using to handle blank fields outputs a null value if the major/minor field is empty. This causes the flow to fail.

Here’s what I’ve tried so far:

  1. Using the expression directly within the connector field.
  2. Storing the result of the expression in a variable, then using the variable as input in the connector field.

Both approaches produce the same error.

Before I explore adding multiple conditions to handle this, I wanted to ask the community if there’s a more efficient expression or solution to account for null values in this scenario. Screenshots are provided for additional context.

53274dadc71a3109ac83001df38c08fe-huge-im
Using the expression directly in the connector field outputs "null" as the value
49fe5c3bf7dd96789bb4a0fc923f3952-huge-im
Using the expression in a variable outputs no value

Here’s how I currently have it configured:

  • The expression is placed directly in the fields within the connector.
  • There will always be at least one major, so that input field is a required input field for the child flow, the others are optional. Per @Alex Wong's guidance I have added the ?the ['text_7'] field.

Below is an example of one of the expressions I’m using for reference.

0b029fd9e03e0fa2cf726a4d146c1db4-huge-im
Full Expression: if(empty(triggerBody()?['text_7']), null, triggerBody()?['text_7'])

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 4 bbcon 2025 Attendee Badge

    @Hallie Guiseppe
    the Majors Item and Minors Item field is intaking an array of string. So instead of using the GUI interface of array adding item click on the icon on the upper-right to go into “input” mode.

    f244e5fa9d33022af0438ceb291509a2-huge-im
    ed0fc336eea8feb711995b791eab2b2f-huge-im

    So now you can directly put an array of string into this text box.

    So there are 2 ways you can go about doing this, not very different in terms of performance/efficiency

    • initialize an Array Variable for Major and Minor
      • condition trigger parameter for major 1 is not null (you need the ? to avoid flow error)
        • if not null, append major 1 to Major array variable
      • repeat for major 2, 3, etc
      • repeat for minor 1, 2, 3, etc into the Minor array variable
    3cfa64a5554ab2762974289d0f3c6ec7-huge-im
    • initialize a String Variable for Major and Minor
      • construct the string like an array and put into Majors and Minors field
      • json(concat('["', triggerBody()?['text'], if(empty(triggerBody()?['text_1']), '', concat(',"', triggerBody()?['text_1'], '"')), if(empty(triggerBody()?['text_2']), '', concat(',"', triggerBody()?['text_2'], '"')), '"]'))
        • notice I take what you said about Major must be at least 1, so I did not condition on the first, but the 2nd and 3rd is conditioned such that if it is empty, nothing is concat into the string, otherwise condition into the string with comma then double quote enclosed
  • Hallie Guiseppe
    Hallie Guiseppe Community All-Star
    Sixth Anniversary Kudos 5 February 2026 Monthly Challenge Name Dropper

    Thanks @Alex Wong! I'll give this a try this week!

  • Hallie Guiseppe
    Hallie Guiseppe Community All-Star
    Sixth Anniversary Kudos 5 February 2026 Monthly Challenge Name Dropper

    Thanks @Alex Wong for helping me to get this working!
    It took some trial and error, so I’m sharing my approach in case it helps others working with education records. This solution dynamically adds any combination of majors and minors provided in the trigger of the child flow.

    I used Compose actions because the child flow only processes one record at a time.

    a6c0f77804c0a1ee0c7c679559df978b-huge-sc

    Majors Array

    To create the Compose_Major_Array, I used if(not(empty())) expressions to account for optional fields:

    [
    triggerBody()?['text_5'],
    if(not(empty(triggerBody()?['text_6'])), triggerBody()?['text_6'], null),
    if(not(empty(triggerBody()?['text_7'])), triggerBody()?['text_7'], null)
    ]

    Then, I cleaned up the array to remove null values:

    json(replace(string(outputs('Compose_Major_Array')), ',null', ''))

    Minors Array

    For the Compose_Minor_Array, I accounted for the possibility that the entire array could be empty:

    [
    if(not(empty(triggerBody()?['text_8'])), triggerBody()?['text_8'], null),
    if(not(empty(triggerBody()?['text_9'])), triggerBody()?['text_9'], null),
    if(not(empty(triggerBody()?['text_10'])), triggerBody()?['text_10'], null)
    ]

    To handle this, I extended the replace() logic to clean up null and empty strings:

    json(replace(replace(replace(string(outputs('Compose_Minor_Array')), ',null', ''), 'null', ''), ',""', ''))

    This successfully handles any combination of majors and minors provided in the trigger, including cases where no minors are listed. I hope this helps anyone tackling a similar challenge.

Categories