Azure Logic Apps - Check if a field is empty in the Create CSV table

Siddharth Kumar 71 Reputation points
2022-03-23T19:19:53.393+00:00

Hi
I have a logic flow app where I am downloading data from a salesforce object. After downloading the data, I follow that by a create CSV table action

186244-image.png

The CSV column 'ParentTerritory1Id__c' needs to be prepended by a client constant(in this example XXX) for some downstream processing - if and only if the value from salesforce is not null. The first 3 fields are required in salesforce - so they will always have a value.

How can i create an expression in the CVS table to check if the value of the field is null before i prepend the client constant.

Regards
Sid

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

Accepted answer
  1. Bruno Lucas 4,426 Reputation points MVP
    2022-03-24T10:08:48.023+00:00

    Hi,

    I don't have a column named 'ParentTerritory1Id__c' but I tried another sales force field (AccountNumber)

    try to add this on that Column: if(equals(item()?['AccountNumber'],null ),'',concat('XXX',item()?['AccountNumber']))

    on your case

    try to add this on that Column: if(equals(item()?['ParentTerritory1Id__c'],null ),'',concat('XXX',item()?['ParentTerritory1Id__c']))

    for XXX just use a logic app variable

    186405-image.png

    is this what you want to acomplish?

    186426-image.png

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful