Skip to main content
Version: 8.1

Vision - Schedule Management Scripting Functions

This page details the various component and extension functions available for Vision's Schedule Management component.

Component Functions​

This component does not have component functions associated with it.

Extension Functions​

filterSchedule​

  • Description

    • Called for each schedule loaded into the management table. Return false to hide this schedule from the management table. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • String schedule - The schedule name
  • Return

    • Boolean

filterHoliday​

  • Description

    • Called for each holiday loaded into the management table. Return false to hide this holiday from the management table. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • String holiday - The holiday name.
  • Return

    • Boolean

onCreateSchedule​

  • Description

    • Called when the add button is pressed when adding a schedule. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the add by calling saveContect.rejectSave('reason').
  • Return

    • None

onDeleteSchedule​

  • Description

    • Called when the delete button is pressed for one or more schedules. This code is executed in a background thread, once for each schedule to be deleted.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
    • String name - The name of the schedule to be deleted.
  • Return

    • None

onSaveSchedule​

  • Description

    • Called when the save button is pressed when adding or editing a schedule. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the edit by calling saveContect.rejectSave('reason').
    • String oldName - The schedule name before editing. Will be None for a schedule being added.
    • String newName - The new name of the edited schedule.
  • Return

    • None

onCreateHoliday​

  • Description

    • Called when the add button is pressed when to add a holiday. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason').
  • Return

    • None

onDeleteHoliday​

  • Description

    • Called when the delete button is pressed for one or more holidays. This code is executed in a background thread, once for each holiday to be deleted.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
    • String name - The name of the holiday to be deleted.
  • Return

    • None

onSaveHoliday​

  • Description

    • Called when the save button is pressed when adding or editing a holiday. This code is executed in a background thread.
  • Parameters

    • Component self - A reference to the component that is invoking this function.
    • Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason'). If more than one role is rejected, reasons will be concatenated.
    • String oldName - The holiday name before editing. Will be None for a holiday being added.
    • String newName - The new name of the edited holiday.
  • Return

    • None