NetSuite saved search filter records with minimal

How do I apply the following requirement in my saved search criteria?

Filter all inventory items

Where min ({memberitem.quantityavailable} / {memberquantity}) <> custitem_quantity

Note: custitem_quantity

- This is a custom numeric field.

Note2: NetSuite is throwing an error when I use the function min

in filters.

+3


source to share


4 answers


There are several questions here.

You have to be careful with custom numbers in Netsuite.

When your inner condition is evaluated, it is not of the same type, because it is fractional. It should be rounded and / or truncated internally at some point. The other side of the expression would be to call the floor or ceiling function to remove all past after the decimal.

In addition, the min function is evaluated after the <> conditional, which will depend on whether your custom numeric type is type compatible.

In the expression you provided us, it must be an exact match (and an exact type), and that is before you think about whether MIN is evaluated.



See how datatypes are created and what columns you handle, since memberitem.quantityavailable may need an additional index depending on your dependencies and where the formula is called. If this formula is used for multiple products, it may be logically consistent.

When I have similar items in my inventory that I want to generate statistics, I try to process them separately, even if I need to do a second pass.

What you are trying to isolate is exactly - I cannot think of a quantity situation where it would be necessary to use division in this way - please refer to Mike Robbins' formula listed above for a properly structured estimate and see if it achieves the desired result ...

If you post the rest of the code, I will help you solve this problem.

0


source


The entire expression is invalid and will not be evaluated due to conditional mapping, MIN, or division. Index the counter by member if you want to sum values. Otherwise CountIF will work for quantity. MIN will only find the lowest value in the given column, so SumIF appears to be what you are after. You can create a second expression that limits the values ​​you are looking for as a preliminary step.



I'm new here, so please clarify what you are trying to accomplish so I can earn the bounty.

0


source


You can also take null values ​​into account to avoid errors or inconsistent data.

If you are using a numeric digit try the following:

Formula (Numeric):

case when min((NVL({memberitem.quantityavailable},0) / NVL({memberquantity},0)) - (NVL{custitem_quantity},0)) then 1 else 0 end 

      

'EQUAL TO' 1

0


source


I believe you can use formula text or a formula digital filter for this.

-1


source







All Articles