4 Replies Latest reply: Apr 15, 2016 6:44 AM by Josue Andrade RSS

    Set input field with expression from chart

    Josue Andrade

      Hello !

       

      I have an input field initialized with zero.

       

      I want to set a value on it based on a expression of a chart, and only then the user can adjust it.

      I need that because the inicial calculation of this field is based on a sum of selected items.

       

      This what I have:

      Inventory:

      ProductStock
      P110
      P23
      P39
      P411

       

       

      Sells History:

      ProductMonthQuantity
      P113
      P124
      P132
      P243
      P315
      P324
      P414
      P423
      P436
      P442

       

       

      Demand:

      ProductSum(Quantity)Allocated
      P177
      P243
      P399
      P477

       

       

      My inputfield is "Allocated". In this example, I selected the Months 1 and 2.

       

      The initial expression for it is:

      If(Sum(Stock) >= Sum(Quantity), Sum(Quantity), Sum(Stock))

       

      For the Product P1, the "initial value" of the input field "Allocated" is 7 (because the Sum(Quantity) is based on Months 1 and 2).

      If I change the selection of the Months, the initial value of the input field "Allocated" should change.

       

      How can I achieve this ?

       

      Thanks!!

      Josué