# Syntax Help for Export definition

**URL:** <https://community.novulo.com/t/syntax-help-for-export-definition/362>\
**Category:** \[Q&A\] General\
**Created:** [July 31, 2024, 8:37am UTC](https://community.novulo.com/t/syntax-help-for-export-definition/362 "2024-07-31T08:37:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suzanne](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Suzanne](https://community.novulo.com/u/Suzanne)\
**Post date:** [July 31, 2024, 8:37am UTC](https://community.novulo.com/t/syntax-help-for-export-definition/362/1 "2024-07-31T08:37:15Z")

</div>

Hello,

Could you kindly assist with a syntax description for my IF statement? We are unsure how to properly get this to work. The context is:

We are trying to create an export that shows all products with a **calculated list prices** , that is _higher then_ **product -\>default sales item → calculated list price** (basically if netto amount is higher then the bruto amount (as there was an incorrect upload done).

My if statement is as following:  
IF; “calculated list price” =\> “product;default sales item;calculated list price”; then SHOW, else don’t SHOW.

We tried with string.if, and boolian.if, but struggle to get a working statement. Especially as the second calculated list price is nested under two parents.

Could you kindly assist? If you need more context please let me know.

Kind regards,  
Suzanne

---

<div class="post-metadata">

**Author:** ![Redmer](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/redmer/32/3_2.png) [@Redmer](https://community.novulo.com/u/Redmer)\
**Post date:** [July 31, 2024, 9:13am UTC](https://community.novulo.com/t/syntax-help-for-export-definition/362/2 "2024-07-31T09:13:38Z")

</div>

Hi Suzanne,

To export a list of products you don’t necessarily need to use an if statement.  
You can simply put an _isgreaterequal_ statement in the where part:

{  
products,  
this,

_this.calculated\_list\_price().isgreaterequal(_  
_this.default\_sales\_price\_list\_item.calculated\_list\_price()_  
_)_

}

This way you only export products where calculated\_list\_price() is greater or equal than the calculated\_list\_price() of the default\_sales\_price\_list\_item of this product.

Does this help?

---

<div class="post-metadata">

**Author:** ![Suzanne](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Suzanne](https://community.novulo.com/u/Suzanne)\
**Post date:** [August 5, 2024, 7:27am UTC](https://community.novulo.com/t/syntax-help-for-export-definition/362/3 "2024-08-05T07:27:34Z")

</div>

> [@Redmer](#):
>
> _this.calculated\_list\_price().isgreaterequal(_  
> _this.default\_sales\_price\_list\_item.calculated\_list\_price()_

Hi Redmer,

Thank you for your swift response. I have tried your suggestion and get the these results:

When i take the Data type salespricelistitems i get this result:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/1X/932add14214ebf7d1c7edd23e2be8c6a1444a1c9.png)

And when I take Product i receive:"

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/1X/fb8f1ad5acbbc40bf702e609b7cd7f8c99e1e1d6.png)

If I take your full suggestion it also doesn’t work.

Could you kindly assist?

KR  
Suzanne

---

<div class="post-metadata">

**Author:** ![Remy](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/remy/32/265_2.png) [@Remy](https://community.novulo.com/u/Remy)\
**Post date:** [August 5, 2024, 10:16am UTC](https://community.novulo.com/t/syntax-help-for-export-definition/362/4 "2024-08-05T10:16:18Z")

</div>

Hey Suzanne,

The reply by Redmer used the [products] table as the starting point. From this starting point the usage of the [default\_sales\_price\_list\_item] is necessary to reach the table with the sales price list items.

In your export you already use the table [salespricelistitems] as the starting point, eliminating the need for the suggested filter by Redmer.  
Looking at your request I would suggest using the following statement:

this.calculated\_list\_price().isgreater(product.default\_sales\_price\_list\_item.calculated\_list\_price())

This expression jumps back to the [products] table and uses the default sales price list item for the check.

Other additions to the filter could also be to check if the sales price list item != the product.default\_sales\_price\_list\_item, or if the sales price list item is\_active, or maybe a selection based on price\_list could be useful.

Let me know if this helps!
