Stay Connected! Follow Us!
Monday, June 25, 2018
Attractive Email Signature
Here is my email signature design for SSIS. Vinh Vong made it happen with his code and was able to push out using Active Directory sync to Google.
I've added the first div to show the background color was white for our Google G Suite is by default white. Change it to make it fit to your theme. Also all the images are png transparency.
Friday, June 15, 2018
PowerSchool: Add Slide In Page for Custom Contact
Credit goes out to Sheldon from PSUG
Page fragment to add the button:
<script>
jQuery(document).ready(functio n() {
var url_string = window.location.href;
console.log(url_string);
var pStart = url_string.indexOf("contactid= ", url_string.indexOf("#?")) + 10;
var pEnd = url_string.indexOf("&", pStart);
var contactID = 0;
if (pEnd > 0)
contactID = url_string.substring(pStart, pEnd);
else
contactID = url_string.substring(pStart);
console.log(contactID);
if (contactID != 0) {
var html = '<div id="extensionfields-div"><labe l for="extensionfields-input">Ex tension Fields</label><a href="edit_extensionfields.htm l?id='+contactID+'" class="button dialogC dockedDialog" id="extensionfields-input" title="Extension Fields">Display</a></div>';
jQuery("#suffix-div").after(ht ml);
}
});
</script>
The slide out page that has the input boxes (edit_extensionfields.html):
<script>
var existing = false;
jQuery.getJSON("edit_extension fields.json?id=~(gpv.id)", function(data) {
if (data.length > 1) {
jQuery("#myfield1").val(data[0 ].myfield1);
jQuery("#myfield2").val(data[0 ].myfield2);
jQuery("#lastupdate").html(dat a[0].lastupdate);
existing = true;
}
});
function submitSave() {
if (!existing) {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe rson",
async: false,
method: "POST",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"personid":"~(gpv.id)",
"myfield1":jQuery("#myfield1") .val(),
"myfield2":jQuery("#myfield2") .val()
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show( );
} else {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
});
} else {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe rson/~(gpv.id)",
async: false,
method: "PUT",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"myfield1":jQuery("#myfield1") .val(),
"myfield2":jQuery("#myfield2") .val()
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show( );
} else {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
});
}
}
</script>
<div class="feedback-confirm" id="save-complete" style="display:none;">Record saved</div>
<div class="feedback-error" id="save-error" style="display:none;">There was a problem saving the record, please try again later</div>
<div class="box-round">
<form action="edit.html" method="POST" id="saveForm">
<table class="linkDescList">
<tr>
<td class="bold" style="width:180px;">My field 1</td>
<td>
<input type="text" name="myfield1" id="myfield1" value="">
</td>
</tr>
<tr>
<td class="bold">My field 2</td>
<td>
<input type="text" name="myfield2" id="myfield2" value="">
</td>
</tr>
<tr>
<td class="bold">Last Updated</td>
<td>
<span id="lastupdate"></span>
</td>
</tr>
</table>
</form>
</div>
<div class="button-row">
<button type="button" onclick="submitSave()">Save</b utton>
</div>
There's also a JSON (edit_extensionfields.json) that gets the existing values into slide in page:
[
~[tlist_sql;
select
myfield1,
myfield2,
nvl(whenmodified,whencreated) as lastupdate
from u_def_ext_person
where
personid = '~(gpv.id)'
;]
{
"myfield1":"~(myfield1;json)",
"myfield2":"~(myfield2;json)",
"lastupdate":"~(lastupdate;jso n)"
},
[/tlist_sql]
{}
]
And lastly, you'll need to install a plugin that gives permission to the slide in page to make the insert and update API calls (attached). You'll need to edit the files inside to include your extension tables/fields.
Download: Contact Extension Plugin
Download: Contact Extension Plugin
Delete Custom Field From PowerSchool
Summary
This article explains how to properly delete a custom field.- Note: To avoid data loss, custom fields should only be deleted outside of regular business hours when other users are not editing PowerSchool information.
- Note: Deleting a custom field that has data in it can result in unexpected behaviour. Before deleting it, always clear the custom field of any data (including for non-active students) by using Student Field Value.
Process
- Log in to PowerSchool Admin
- Select the District Office
- Search for all active and inactive students or staff (Search for /)
- From the Functions dropdown, select Student Field Value or Staff Field Value
- Click the Fields link to select the field you would like to delete, or type it in.
- Check Clear Field Value
- Click Submit
- Confirm the change by clicking Submit at the preview screen.
- Start >System > Page and Data Management > Manage Database Extensions
- Database table to extend = Students
- Workflow type = Advanced Extension > Next
- Select extension name > Next
- Select table name > Next
- Find Field name and click on delete button then submit
- Note: Depending on how much data is related to the custom field being deleted, it may only take a few minutes to remove the field, or in larger districts, an hour or more.
- Note: PowerSchool may need to be restarted for the custom fields to be cleared from the cache.
Removal from Oracle
ATTENTION! If the field still shows in the search field, go delete the record out of FIELDSTABLE from Oracle.
delete from fieldstable where name = 'fieldname';
PowerSchool Customization Tips
Page fragment to add the button:
<script>
jQuery(document).ready(functio n() {
var url_string = window.location.href;
console.log(url_string);
var pStart = url_string.indexOf("contactid= ", url_string.indexOf("#?")) + 10;
var pEnd = url_string.indexOf("&", pStart);
var contactID = 0;
if (pEnd > 0)
contactID = url_string.substring(pStart, pEnd);
else
contactID = url_string.substring(pStart);
console.log(contactID);
if (contactID != 0) {
var html = '<div id="extensionfields-div"><labe l for="extensionfields-input">Ex tension Fields</label><a href="edit_extensionfields.htm l?id='+contactID+'" class="button dialogC dockedDialog" id="extensionfields-input" title="Extension Fields">Display</a></div>';
jQuery("#suffix-div").after(ht ml);
}
});
</script>
jQuery(document).ready(functio
var url_string = window.location.href;
console.log(url_string);
var pStart = url_string.indexOf("contactid=
var pEnd = url_string.indexOf("&", pStart);
var contactID = 0;
if (pEnd > 0)
contactID = url_string.substring(pStart, pEnd);
else
contactID = url_string.substring(pStart);
console.log(contactID);
if (contactID != 0) {
var html = '<div id="extensionfields-div"><labe
jQuery("#suffix-div").after(ht
}
});
</script>
It looks like this:
The slide out page that has the input boxes (edit_extensionfields.html):
<script>
var existing = false;
jQuery.getJSON("edit_extension fields.json?id=~(gpv.id)", function(data) {
if (data.length > 1) {
jQuery("#myfield1").val(data[0 ].myfield1);
jQuery("#myfield2").val(data[0 ].myfield2);
jQuery("#lastupdate").html(dat a[0].lastupdate);
existing = true;
}
});
function submitSave() {
if (!existing) {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe rson",
async: false,
method: "POST",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"personid":"~(gpv.id)",
"myfield1":jQuery("#myfield1") .val(),
"myfield2":jQuery("#myfield2") .val()
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show( );
} else {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
});
} else {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe rson/~(gpv.id)",
async: false,
method: "PUT",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"myfield1":jQuery("#myfield1") .val(),
"myfield2":jQuery("#myfield2") .val()
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show( );
} else {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide( );
jQuery("#save-error").show();
}
});
}
}
</script>
<div class="feedback-confirm" id="save-complete" style="display:none;">Record saved</div>
<div class="feedback-error" id="save-error" style="display:none;">There was a problem saving the record, please try again later</div>
<div class="box-round">
<form action="edit.html" method="POST" id="saveForm">
<table class="linkDescList">
<tr>
<td class="bold" style="width:180px;">My field 1</td>
<td>
<input type="text" name="myfield1" id="myfield1" value="">
</td>
</tr>
<tr>
<td class="bold">My field 2</td>
<td>
<input type="text" name="myfield2" id="myfield2" value="">
</td>
</tr>
<tr>
<td class="bold">Last Updated</td>
<td>
<span id="lastupdate"></span>
</td>
</tr>
</table>
</form>
</div>
<div class="button-row">
<button type="button" onclick="submitSave()">Save</b utton>
</div>
var existing = false;
jQuery.getJSON("edit_extension
if (data.length > 1) {
jQuery("#myfield1").val(data[0
jQuery("#myfield2").val(data[0
jQuery("#lastupdate").html(dat
existing = true;
}
});
function submitSave() {
if (!existing) {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe
async: false,
method: "POST",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"personid":"~(gpv.id)",
"myfield1":jQuery("#myfield1")
"myfield2":jQuery("#myfield2")
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show(
} else {
jQuery("#save-complete").hide(
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide(
jQuery("#save-error").show();
}
});
} else {
jQuery.ajax({
url: "/ws/schema/table/u_def_ext_pe
async: false,
method: "PUT",
contentType: "application/json",
data: JSON.stringify({
"tables":{
"u_def_ext_person":{
"myfield1":jQuery("#myfield1")
"myfield2":jQuery("#myfield2")
}
}
}),
complete: function(xhr, textStatus) {
if (xhr.status == 200) {
jQuery("#save-error").hide();
jQuery("#save-complete").show(
} else {
jQuery("#save-complete").hide(
jQuery("#save-error").show();
}
},
error: function(result) {
jQuery("#save-complete").hide(
jQuery("#save-error").show();
}
});
}
}
</script>
<div class="feedback-confirm" id="save-complete" style="display:none;">Record saved</div>
<div class="feedback-error" id="save-error" style="display:none;">There was a problem saving the record, please try again later</div>
<div class="box-round">
<form action="edit.html" method="POST" id="saveForm">
<table class="linkDescList">
<tr>
<td class="bold" style="width:180px;">My field 1</td>
<td>
<input type="text" name="myfield1" id="myfield1" value="">
</td>
</tr>
<tr>
<td class="bold">My field 2</td>
<td>
<input type="text" name="myfield2" id="myfield2" value="">
</td>
</tr>
<tr>
<td class="bold">Last Updated</td>
<td>
<span id="lastupdate"></span>
</td>
</tr>
</table>
</form>
</div>
<div class="button-row">
<button type="button" onclick="submitSave()">Save</b
</div>
Looks like this:
There's also a JSON (edit_extensionfields.json) that gets the existing values into slide in page:
[
~[tlist_sql;
select
myfield1,
myfield2,
nvl(whenmodified,whencreated) as lastupdate
from u_def_ext_person
where
personid = '~(gpv.id)'
;]
{
"myfield1":"~(myfield1;json)",
"myfield2":"~(myfield2;json)",
"lastupdate":"~(lastupdate;jso n)"
},
[/tlist_sql]
{}
]
~[tlist_sql;
select
myfield1,
myfield2,
nvl(whenmodified,whencreated) as lastupdate
from u_def_ext_person
where
personid = '~(gpv.id)'
;]
{
"myfield1":"~(myfield1;json)",
"myfield2":"~(myfield2;json)",
"lastupdate":"~(lastupdate;jso
},
[/tlist_sql]
{}
]
And lastly, you'll need to install a plugin that gives permission to the slide in page to make the insert and update API calls (attached). You'll need to edit the files inside to include your extension tables/fields.
Download: Contact Extension Plugin
Download: Contact Extension Plugin