Current Term Indicator in Advanced List?
Is it possible to get a current term field similar to the current School year field?
Comments
-
Funny enough, I was just on this site earlier today looking around to see if anyone had a solution for this. I couldn't find anything so I wrote this:
var termData = bbGet("https://api.sky.blackbaud.com/school/v1/terms?offering_type=1")
var currentTerm;
var divLevel = {divisionLevelID}
const day = new Date();
const today = day.toJSON();
for(i = 0; i < termData.value.length; i++){
if(termData.value[i].level_id === divLevel && termData.value[i].begin_date <= today && !(termData.value[i].end_date < today)){
currentTerm = termData.value[i].id.toFixed(0);
break;
}
}
bbGet is a reference to some code that I wrote elsewhere that makes the API call. Basically termData is just all the data that came from skyAPI at the endpoint listed. You may need to use a different offering type, but “offering_type=1” worked for me.
Also the Level ID will need to be defined for your school so it knows which division to filter to.
This will return the ID number for the current term, but you should be able to switch it to the name easily enough.
Oh and, I just realized, you may not be working in JavaScript, but this is JavaScript.
Hope that helps!
1 -
Thank you very much! I was using R for this particular problem but I was able to translate from js no problem. Have a good one ?
0
Categories
- All Categories
- 7 Blackbaud Agents for Good™
- Raiser's Edge NXT test
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 406 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 361 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 667 Blackbaud Grantmaking™
- 588 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 949 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 85 JustGiving® from Blackbaud®
- 6.8K Blackbaud Raiser's Edge NXT®
- 3.8K SKY Developer
- 251 ResearchPoint™
- 121 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 244 Member Lounge (Just for Fun)
- 38 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 810 Community News
- 3K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)