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 thenproduct ->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.
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.
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 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.