Error adding Fund to a receipt.

Options

I am looking to add a Fund to a receipt. I am following the instructions from the mini-lab video: Power Automate Mini Skills Lab - Fund Description and Payment Method - YouTube .

8b20d4ada9e265e9266deb8c1ee985ea-huge-im

But I am getting this error.

b11757e84070ace2ecb03c4683b08c59-huge-im

Anyone see what I might be doing incorrectly?

Comments

  • Hi @Reuben Schmitz, add a question mark after the [0]. So it should read:

    ['gift_splits'][0]?['fund_id']

  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Tenth Anniversary Kudos 3 Name Dropper Participant

    Reuben Schmitz - Matt Thacker is correct that adding a ? can often time avoid those issues. However, in testing it, I'm not seeing an error without it, but that's typically when it's part of a loop. Can you post the context of that Get a Fund? Is it part of a Loop, a one-off, etc? The context may change the suggested approach.

  • Glen,

    I have created a gift button to create a single receipt letter. There is no loop. Here is more of the flow for reference. The extra ? didn't make any difference.

    e0b2ab554b00768663bd523fa20e3931-huge-im
    7cf0e95dda961a742a0f81dda652bcc1-huge-im
  • I know that the video example used a list - does it make any difference for the expression that this is for a one-off gift, not a list?

  • The error says that it can't select Gift Splits, but looking at the json for the gift, this data appears to be present.

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

    Reuben Schmitz:

    I know that the video example used a list - does it make any difference for the expression that this is for a one-off gift, not a list?

    That particular code is assuming that it is an item in a list. The code would be different if it's a one-off. Assuming you didn't rename the original ‘Get a gift’ (which it doesn't appear you renamed), then try

    outputs('Get_a_gift')?['body/gift_splits'][0]['fund_id'] .

  • Glen, that was the problem and the solution. Thanks for the assist. Still trying to get a handle on Expression use and syntax.

Categories