@marcus-wiegand suggested a way to implement this more easily: Could such a code be created from the Leave Applicaten record names (For example, HR-LAP-2023-00089)? Since only booked Leave ...