Help Needed with Action Filter

Options

I am trying to get a list of Actions with Solicitors. I am looking to exclude all Actions with no Solicitor using this filter:

df64183bf1154f7909bf7eea25f8ddca-huge-im

However, I am unable to connect the Action and Solicitor without getting an error - this is what I am using:

b421a85c501b34a1172d077b9ef767ae-huge-im

My guess is the Join is incorrect - any thoughts as to how to fix it?

Comments

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

    @Reuben Schmitz
    going to need a little more details from you on your intention as your actions doesn't seems say that.

    First of all, if you are trying to get a list of actions without solicitor (not constituent specific), so your list actions is correct and filter array action is correct. However, when you “apply to each” on the value, you are using dynamic content from list actions? (were you trying to loop through the filtered array? or was trying to do something with the full list of actions returned?)

    I don't know what you were trying to do with the apply to each, so can't understand what you are trying to do with get a constituent action and list constituents - connect action to constituent of action.

    And yes, your join is not correct. join(outputs('Get_a_constituent_action')?[body('Filter_array')], ‘,’)

    join() takes first parameter as the array (simple array) and then make a string by concatenate each value (simple value) with the 2nd parameter. Your first parameter does not make sense and isn't a real dynamic content. You are telling flow that in the Get a constituent action action, there is a dynamic content named body('Filter_array').

    for simple array such as ['1111','2222','3333']: join(simple_array, ‘,’) will give you ‘1111’,'2222','3333'

    you cannot use join() to join a “complex” array of objects with many properties (i.e. array of actions) as join will not know how you want to join and which field you want to join together.

    To get a simple array, use the Select action in the data operation connector of flow. You will first create a simple array by selecting ONE field you want to do the join with. (i.e. “id” property of the list actions complex array).

  • @Alex Wong thanks for taking a look. So what I am trying to do is create output for email that lists Actions and the Action and Constituent Assigned Solicitors. I had used this Join function in a previous flow successfully when starting with a specific NXT List of Actions. I was looking instead to use the List Actions Advanced Options to expand the list, but then got Actions with no Solicitor marked, causing the error. I was trying the filter to overcome this.

    I did change the Apply to each (which I had missed), and then changed the Join back to what I was previously using and this took care of the issue. The flow is working again.

    a9e80ae79080fcaa43fdfe004807aab5-huge-im

    Thanks for the catch and the assist. as always, your insight and expertise are truly appreciated.


Categories