9 Replies Latest reply on Jun 20, 2016 10:23 AM by bigtom

    Unstored Calculation Slow Perform Find and cannot use in Portal *** URGENT ***

    hobbiesdeveloper

      Hi,

       

      I stumbled on an issue I'm facing with the unstored calculations as I have 70 percent of the fields as unstored, which drastically reduces the find process for the fields. I'm trying to include a field in my Products Layout, which will show an alert for all products that have not been sold over 70 days and less than 91 days, which does show up perfectly but when you try to perform a find for all 50,000 records it takes around 3 minutes to find all fields with the alert showing.

       

      Currently the field Products_Alert is referencing unstored calculations which cannot be a stored calculation. Is there a way to bypass this without having to go back through all the related unstored calculations and somehow change them all to a number field or a stored calculated field if possible?

       

      Here are the fields I currently working with:

       

      Products_Alert ( Calculation ) = Unstored, from Product, = If( LastPurchase_Days > 70 and LastPurchase_Days < 91 and Quantity_on_Hand > 0 ; "Low Seller Alert" ; "" )

       

      ------------------------------------------------------------------------------------------------------------------------------

      LastPurchase_Days ( Calculation ) = Unstored, from Product, = Get( CurrentDate ) - LastPurchase_Date

      LastPurchase_Date ( Calculation ) = Unstored, from Product , = Last( product_POLINEITEM::poOrderDate )

      product_POLINEITEM::poOrderDate ( Date ) = Indexed, Auto-enter Calculation = Get( CurrentDate )

       

      ------------------------------------------------------------------------------------------------------------------------------

       

      Quantity_on_Hand ( Calculation ) = Unstored, from Product, = onPO - ( Qty Sold ) + Qty Adjusted +  Initial Level

       

      onPO ( Calculation ) = Unstored, from Product, = Sum( product_POLINEITEM::received_Quantity ) + 0

      product_POLINEITEM::received_Quantity ( Number ) = indexed

       

      Qty Sold ( Calculation ) = Unstored, from Product, = Sum ( product_SOLD::Quantity ) + 0

      product_SOLD::Quantity ( Number ), indexed

       

      Qty Adjusted ( Calculation ) = Unstored, from Product, = Sum( product_INVENTORYADJUSTMENTS::Qty Adjusted Total ) + 0

      product_INVENTORYADJUSTMENTS::Qty Adjusted Total ( Calculation ) = Unstored, from Inventory Adjustments = Sum( Qty Adjusted )

      product_INVENTORYADJUSTMENTS::Qty Adjusted ( Text ) = indexed

       

      Initial Level ( Number ) = indexed

       

      Is there a way to make Products_Alert without any unstored variables as it's way to slow in finds and I cannot even use Products_Alert in Relationships due to it being unstored?

       

      Please help, any info helps?