Logic-Apps Collection function Join failing for Null values

Praveen Katta 21 Reputation points


I have a logic apps with http call, Parsing the response and trying to insert the data into a Oracle Database table.

Response has some array fields which needs to be appended to form a string in order to get inserted into a table. To achieve this I used Collection's Join function to append all the elements in the array to form a single string.

Sometimes we might get Null for these fields in the response so in that case Job is getting failed as Join function template not accepting Null value.

Can anyone please suggest a solution or any workaround to achieve this.

Thanks in advance!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,991 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,611 Reputation points Microsoft Employee

    While there isn't a built-in function to handle null checks, you could use an expression like if(equals(<array_field_token>, null), array(null), <array_field_token>) when accessing the array field.

    So, for example, if you have your array field in a variable, the expression to join it while working around possible null values would be

    join(if(equals(variables('collection'), null), array(null), variables('collection')), ',')
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful