Hello All
My name is Kurt and i’m part of the Netcall Training Team. Recently we received a question for Liberty Create from a delegate completing their Level 1 Builder Essentials Certification assignment.
The question seems to be a popular one we receive. So I would like to publish the question and answer to the community to assist other builders in the future.
The question:
“How do I create a subset which encompasses records within a time window? For example, Create a subset for records which are within 7 days of it’s creation date.”
Answer:
This solution will apply to any date field, be it the Date Create attribute or a Date property within an Object.
Step 1) Create a composite to capture what the current date is – This will define what today is for the use in step 2.
- Add Composite
- Name: Current Date
- Base Object: Your case object or the object where your records will be located
- Type: Function
- Function: Current date
Step 2) Create a composite which will output the date of 7 days minus today’s date – This lets the platform know what the last date of the 7 day window is.
- Add Composite
- Name: 7 days before today’s date
- Base Object: Your case object
- Type: Function
- Function: Subtract interval (returns date)
- Field: Current Date
- Interval subject: Use default – days
- Interval value: 7
Step 3) Create a subset to use your two new composites to see if the record creation date is greater than the 7th day prior to today’s date.
- Add Subset
- Name: Active cases within 7 days of today
- Base Object: Your case object
- Defined by: Predefined filters
- Predefined Filtered Tab:
- Add Condition:
- Field: Date Created
- Comparator: Greater than
- Value: (Click on the {n} to set this) 7 days before today’s date (subset)
That It! Once created, apply the subset to a list.
Hope someone finds this useful!
Regards
Kurt
Netcall Training Academy
View our upcoming Liberty Create Level 1 & Level 2 Builder Essentials course here: Academy - Netcall Community