Automate

 View Only
Expand all | Collapse all

Sum Column in Repeating Table If Another Column is Equal to a Specific Criteria

  • 1.  Sum Column in Repeating Table If Another Column is Equal to a Specific Criteria

    Posted 08-27-2025 11:27

    I am trying to sum both the Unrestricted Stock Column and the Blocked Stock Column (separately) based on Plant and then Populate in the Stock Review table again based on plant.

    The left table in the System Use Only area is based on a MBEW query that returns Total Valuated Stock at the Plant level.

    The right table in the System Use Only area is based on a MARD query that returns Unrestricted and Blocked Stock at the Storage Location Level.

    The Stock Review table is again the MBEW table with two manual fields added to hold the sums of the two types of Stock being returned in the MARD query.

    I am able to get the total of the Unrestricted Stock for all entries in the MARD table using the rule wizard to create a simple rule, but I have not figured out how to do this by plant.

    Additionally, I have been able to populate a comma separated list of values from the Unrestricted stock field (with some error causing the 1310 plant not to populate) that use code to iterate through the repeating table. I was unable to do this with a simple rule using the rule wizard.

    Lastly, I considered join the tables in Studio, but I would still have to overcome the sum of the two columns by plant issue.

    Any suggestions would be appreciated!



    ------------------------------
    Ann Davis
    Technical Data Analyst
    ------------------------------


  • 2.  RE: Sum Column in Repeating Table If Another Column is Equal to a Specific Criteria

    Employee
    Posted 09-11-2025 10:20

    Hey Ann,

    In my example i have added unRestricted and BlockedStock based on plant number and then copied the data to another repeating table.

    Please find solution attached on link : https://nowtransfer.de/9342945ecfdc

    There is a javascript code rule on Button_13 that you can use to implement in you main solution. 

    Hope this helps.

    Regards



    ------------------------------
    Hammad Naeem
    *Precisely Software Inc.
    ------------------------------