Skip to Content
Technical Articles

EC – Time Sheet – How to check min max by Time Valuation

I) Requirement:

The is a time type with with duration from 1 to 2 hours only.

How to check the requirement (min = 1 and max = 2) by using SF Time Sheet solution?

II) Useful info needed:

Please clear what the time recording profile is.

And understand how the Time Valuation Type ‘Aggregate Input Group and Split’ work.

You can see the below flow which captured in SF_EC_TimeSheet_Impl pdf already.

III) Maximum validation:

1. Configuration:

Actually with this Time Valuation Type, it’s very easy to verify the maxim.

Below configuration is to compare Input from TimeType Group ‘Admin’ with Threshold 2.

  • Output: Time Type Group Above.
  • Error Flag: with TT grp above according.
  • Error Message: It’s a free text – I just put ‘Max – Plz input from 1-2 only’.

2. Output (Testing):

EC time sheet will raise error immediately when emp specify a duration more than 2hrs.

IV) Minimum validation (WRONG approach)

If we just try the same way to validate minimum. Instead of putting on Group Above, you configure with Group Below, it does NOT work, which I have tested already.

  • Assuming if you configure with Group Blow (with Threshold = 1), any values inputted such as 0.5hrs, 2hrs, etc, SF Time Sheet will raise error message.
  • It is due to the fact that the Time Evaluation Type ‘Aggregate Input Group and Split’ simply compare threshold and split accordingly.
  • Thus it might not be possible to check minimum with simply using the Group Below.

V) Minimum validation solution

1. Configuration:

To achieve the one, we will need to build 2 different Time Valuations.

1.1. Splitting input:

  • Create one Time Valuation to split your input accordingly.
  • Noted, instead of using Threshold as 1, plz use half of its value. For this case, it’s 0.5.
  • (If you want to check minimum with 3, then use the threshold as 1.5).
  • Plz refer below screenshot below:
  • You can see I split the input 2 Group Below (named as Split_1_below) and Above (named as Split_2_above).

1.2. Comparing the splitting:

  • After having the splitting, you are going to compare them together.
  • You can see, the Input Time Type Group now is Split_1_below.
  • And the Threshold Group is Split_2_above.
  • Now if Split_1_below > Split_2_above, then Time Type Group Above will be updated.
  • Then error message will be shown with content ‘Split – Plz input from 1-2’. You can change the message to make it more meaningful as it’s free text message.

1.3. Explain the flow / sequence:

  • Input is 0.4 => (1st Valuation) Split_1_below will be 0.4; Split_2_above will be 0
  • Then (2nd Valuation) => Split_1_below = 0.4 > Split_2_above = 0 => Raise error.
  • Input is 0.75 => (1st Valuation) Split_1_below will be 0.5; Split_2_above will be 0.25
  • Then (2nd Valuation) => Split_1_below = 0.5 > Split_2_above = 0.25 => Raise error.
  • Input is 1.0 => (1st Valuation) Split_1_below will be 0.5; Split_2_above will be 0.5
  • Then (2nd Valuation) => Split_1_below = 0.5 = Split_2_above => NO error.
  • Input is 1.5 => (1st Valuation) Split_1_below will be 0.5; Split_2_above will be 1.0
  • Then (2nd Valuation) => Split_1_below = 0.5 < Split_2_above = 1.0 => NO error.

2. Output (Testing):

EC time sheet will raise error immediately when emp specify a duration less than 1hrs.

  • I use different error to demonstrate that the error comes from different valuations.

VI) Conclusion

As demonstrated above, the EC Time Sheet seems very flexible and powerful and allows us to build many validations via Time Valuation.

In stead of requiring to build additional coding like Cats before, now we have a cool framework to play around.

 

Hope it’s useful for you to start configuring in EC – Time Sheet.

 

Best regards

Woody (Trong Minh)

2 Comments
You must be Logged on to comment or reply to a post.
  •  

    Hi Woody,

    First of all, thank you for the detailed solution. I have a question.

    In point 1.3,  when the input is 0.75 and 1.0, the “Split_1_below” value is 0.5. But for input 1.5 “Split_1_below” value is 1.5. I do not understand that logic. Could you please clarify if possible.

    Thank you,

    Sanjay

    • Sorry, it’s a typo. I have corrected 🙂 Thanks for your comment.

      When input is 1.5, “Split_1_below” value is 0.5. Then “Split_2_above” = 1.0.

      • Because Split_1_below < Split_2_above, then NO error.