# Logical Conditions in edi file format

**URL:** <https://connective.celigo.com/t/logical-conditions-in-edi-file-format/683>\
**Category:** Integrator.io\
**Tags:** edi, ftp, mapper, netsuite\
**Created:** [August 17, 2022, 10:08am UTC](https://connective.celigo.com/t/logical-conditions-in-edi-file-format/683 "2022-08-17T10:08:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shamaliraut](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@shamaliraut](https://connective.celigo.com/u/shamaliraut)\
**Post date:** [August 17, 2022, 10:08am UTC](https://connective.celigo.com/t/logical-conditions-in-edi-file-format/683/1 "2022-08-17T10:08:08Z")

</div>

Hi there,

Can we use if/else or any logical expression in edi file mapping.

I am generating a edi file on FTP by fetching data from NetSuite. While generating files I am getting few field with empty values. If the field is empty I need to ignore the entire node/segment, Is there a possibility of that.

this is the node/segment from file we need to ignore if {{[subCategory]}} is empty -

{  
 "name": "REF",  
 "maxOccurrence": 1000,  
 "required": false,  
 "relativeDataPath": "REF",  
 "elements": [  
 {  
 "name": "REF",  
 "value": "REF"  
 },  
 {  
 "name": "Reference Identification Qualifier",  
 "value": "SCT"  
 },  
  
 {  
 "name": "Reference Identification",  
 "value": "{{{[subCategory]}}}"  
 }  
  
 ]  
 }

---

<div class="post-metadata">

**Author:** ![davidgollom](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/davidgollom/32/6605_2.png) [@davidgollom](https://connective.celigo.com/u/davidgollom)\
**Post date:** [August 17, 2022, 10:18pm UTC](https://connective.celigo.com/t/logical-conditions-in-edi-file-format/683/2 "2022-08-17T22:18:09Z")

</div>

Not sure of the context exactly but have you tried including that block within a handlebar {{#if}}{/if}} block??
