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
- 6 Blackbaud Community Help
- 209 bbcon®
- 1.4K Blackbaud Altru®
- 395 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 648 Blackbaud Grantmaking™
- 566 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 937 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.5K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 247 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 239 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 31 PowerUp Challenges
- 3 (Open) 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
- 782 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)