none
Filter Activity RRS feed

  • Question

  • Hello

    I have been working on this all morning. I am trying to use the Filter Activity. Here is my error and the attached screenshot shows my filter conditions.....please help. I am running out of time with my POC.

    CompanyID is one of the columns in each row. I am trying to filter to get just one row back with CompanyID which is equal to my Variable CompanyID.

    Thanks!
    Mike

    Error
    Activity Filter1 failed: The execution of template action 'FilterFilter1' failed: The evaluation of 'query' action 'where' expression '@equals(activity('LookUp Company IDs and Connection String').output.CompanyID,variables('CompanyID'))' failed: 'The expression 'equals(activity('LookUp Company IDs and Connection String').output.CompanyID,variables('CompanyID'))' cannot be evaluated because property 'CompanyID' doesn't exist, available properties are 'count, value, effectiveIntegrationRuntime'.


    Mike Kiser

    Tuesday, June 18, 2019 4:58 PM

Answers

  • Looks like there was a typo on my end, the 'activity(' enclosure is unnecessary. The following should work:

    @equals(item().CompanyID, variables('CompanyID'))

    • Marked as answer by EMKISER Tuesday, June 18, 2019 10:48 PM
    Tuesday, June 18, 2019 9:58 PM
  • Hi Daniel,

    Thanks so much. When I just pasted that into my Condition I am getting the following error:

    Syntax error: Missing enclosing paranthesis

    Then when I add a closing paran at the end I get this error. Any suggestions? I really don't like this expression language at all lol

    Only a single string literal argument is allowed inside the class clause

    Thanks, MIke


    Mike Kiser


    • Edited by EMKISER Tuesday, June 18, 2019 7:44 PM
    • Marked as answer by EMKISER Tuesday, June 18, 2019 10:49 PM
    Tuesday, June 18, 2019 7:42 PM

All replies

  • Hi Mike,

    To properly access the column CompanyID of your current row, you need to reference item().CompanyID in your filter condition. In a filter activity, item() refers to the current value of the array you are iterating over. In your case, the following expression should work for you:

    @equals(activity(item().CompanyID, variables('CompanyID'))

    Hopefully this works for you!

    Thanks,

    Daniel

    Tuesday, June 18, 2019 5:53 PM
  • Hi Daniel,

    Thanks so much. When I just pasted that into my Condition I am getting the following error:

    Syntax error: Missing enclosing paranthesis

    Then when I add a closing paran at the end I get this error. Any suggestions? I really don't like this expression language at all lol

    Only a single string literal argument is allowed inside the class clause

    Thanks, MIke


    Mike Kiser


    • Edited by EMKISER Tuesday, June 18, 2019 7:44 PM
    • Marked as answer by EMKISER Tuesday, June 18, 2019 10:49 PM
    Tuesday, June 18, 2019 7:42 PM
  • Looks like there was a typo on my end, the 'activity(' enclosure is unnecessary. The following should work:

    @equals(item().CompanyID, variables('CompanyID'))

    • Marked as answer by EMKISER Tuesday, June 18, 2019 10:48 PM
    Tuesday, June 18, 2019 9:58 PM
  • Thanks Daniel!
    That worked; I get confused when to use the "activity(" and when not to and still don't quite understand. thanks for your reply! It works great!
    Mike

    Mike Kiser

    Tuesday, June 18, 2019 10:49 PM