Dynamically pass a Year to an Advanced List? (to be called via SKY's List Single or Legacy list)

Hi all

Is there a way to dynamically pass a year to an Advanced List, so that it can run headless via the SKY List Single or Legacy list? e.g. Run List for: 2021-2022

I suppose I could create Lists for each year and call the correct one dynamically, or I could manually modify each List each year, but it would be nice to have one List and use it for whatever year I wanted.

TIA,
-Joel

Comments

  • Brian Gray
    Brian Gray Community All-Star
    Eighth Anniversary Kudos 5 First Reply bbcon 2025 Attendee Badge

    The API calls and Advanced lists don't work that way. You either have to use multiple lists, or use one list and filter the data in your program.

    In several of my headless programs (written in Visual Studio) I use runstring arguments to indicate which records in a list the program should use (or ignore).

  • To my knowledge you can't dynamically pass in years but you can filter the list for the current year by using the School Year object and setting School Year.Current Year to True.

  • Brian Gray:

    The API calls and Advanced lists don't work that way. You either have to use multiple lists, or use one list and filter the data in your program.

    Got it. Thanks Brian!

    -Joel

  • Warren Hyson:

    To my knowledge you can't dynamically pass in years but you can filter the list for the current year by using the School Year object and setting School Year.Current Year to True.

    Thanks Warren!

    My query was using only objects: Course Base - Course Group - Course Term, and Course Term.School Year only had options for selecting individual years. When I add the School Year object, I now see the option to set School Year.Current Year to True. ?

    Thanks,
    -Joel

Categories