Clarity

  • 1.  Limit Sum of Values in a List

    Posted Jul 10, 2018 01:00 PM

    I have a custom sub-object that calculates Project cost that should be assigned to different divisions based on percentages entered.

    1. User creates a project and enters a financial plan

    2. User goes to the custom sub-object view and enters a division and corresponding percentage. The data displays in a grid.

    3. User can enter as many divisions (lines) as he/she wants, one at a time.

     

    Desired goal: Limit the total percentage across all divisions to 100% for a single project.

     

    I see a way to limit the percentage field entry to a range, but that is for a single line, not the sum of all lines.



  • 2.  Re: Limit Sum of Values in a List

    Posted Jul 11, 2018 04:04 AM

    Don't think so - you could "validate" the entry after the page is saved (through a process) and set a "is valid" flag or something like that perhaps?



  • 3.  Re: Limit Sum of Values in a List

    Posted Jul 11, 2018 04:19 AM

    No, it is not possible. Because what I understand from your requirement, is that, you have a custom object and the user, basically, creates instances (which you are referring as lines) for that object. Now, you can do limit the range of an attribute under that object but you cannot limit the number of instances that can be created under an object. So, that means, user who have the create right for that object can create as many lines/rows as he wants to. PPM will not give you any option to restrict the same. Hope that clarifies. 

     

    Cheers!



  • 4.  Re: Limit Sum of Values in a List

    Posted Jul 11, 2018 04:19 AM

    We use Data Integrity rules to identify these types of anomalies.



  • 5.  Re: Limit Sum of Values in a List

    Posted Jul 11, 2018 08:41 AM

    I don't think it can be achieved in supported means to restrict the entry. But at least to make users aware of such a possibility, you may create an Aggregated Calculated Attribute in Project object to sum the percentages of its sub object instances(and you may use display mappings for better UX, say Red flag if it is more than 100% etc) and place in the project page.



  • 6.  Re: Limit Sum of Values in a List

    Posted Jul 12, 2018 04:17 AM

    As others have alluded to, you can write a process to validate.

    As an alternative you can use the dymamic lookup trick to do the validation. You can use javascript to manipulate the DOM to hide the save, change format etc.(unsupported!)

     

    Any even more extreme version could be to build a simple app in a portlet and then have that validate and write back to the object if it's valid. Pretty simple to do that.(again unsupported!)



  • 7.  Re: Limit Sum of Values in a List

    Posted Jul 13, 2018 05:59 PM

    It looks like aggregated fields cannot be used in simple processes. Am I correct that it would have to be a custom GEL script embedded in a process?