Safety Alarm Testing App

Safety Alarm Testing App

Purpose

The Safety Alarm Testing App provides an easy, user-friendly way to check the safety alarms located within Health Services and Needles Hall. It connects to the Staff Directory List to pull the tester’s full name, and the test results are recorded in CW Safety Alarm Testing Data.

Location

The Safety Alarm Testing App can be found in Power Apps.

The CW Safety Alarm App Testing Data List

The link to the list is CW Safety Alarm Testing Data.

Since it is hosted in the SharePoint, all users must be able to edit in order for the list to record new tests.

While the supported limit is 50,000 items, the General Recommended limit is 5,000. In the future, if there are issues/errors when saving new tests, check the lists to see how many recorded results exist, then consult with the IT Manager [currently Lance] about deleting some of the old test data to free up space for new tests.

Design

There is one page, keeping it simple and concise with the UI.

  • On the right side, it is a written scrollable textbox with instructions for the tester.

  • On the left side, it is the fields the tester must fill out. Underneath are the 3 different buttons in accordance of scenario.

  • On the top right, there is a button that will lead the tester to the results if needed.

Editing

Any changes to the instructions, action of the buttons, and options for dropdowns must be done through PowerApps. The combo box for full name will update in accordance to the Staff Directory List. Instructions for each are below.

Fillable Fields

Date of Test

This is a date-picker component. The default is set to the current date.

Tester’s Full name

This is drawn from the Staff Directory List. It is connected via Data > Sharepoint > Link to the staff directory. This connection is direct and should never need to be changed unless the Staff Directory List is moved.

Since a combo-box was used for this field, the only thing written in the function box is below:

'Staff Directory'

To change what is written in the dropdown, click the box > Advanced > Scroll down to InputTextPlaceholder and change accordingly.

Building

The only buildings where we manage Safety Alarms are HS and NH. If this ever changes, insert a new building using quotations and separate using a comma.

["HS", "NH"]

Room Number

This is a text input.

The Instructions

The instructions are written in HTML code. This allows aid in emphasizing certain parts of the instructions. The code is below, if ever need to be changed, edit accordingly.

The elements used are:

  • <b></b> for bold

  • <i></i> for italics

  • <br></br> for line breaks

  • <ul></ul> for making a list

  • <li></li> for the list’s bullet points

  • <font color=#e82e44></font> for the Report Missing Safety Alarm

  • <font color= #1a98db></font> for the Report Unsuccessful Test

  • <font color= #26ba23></font> for the Save

"<b>1.</b> Fill out the form on the left to record your name as well as the date and location of the safety alarm you are testing. <br> </br> <b>2.</b> Confirm that a safety alarm exists in the room / area you wish to test. If it exists, proceed to step #3. <br> </br> <b> If there should be a safety alarm but it is missing, </b> please click <b><font color=#e82e44><i>Report Missing Safety Alarm</i></font></b> to send an email to IST. You DO NOT need to do anything further with this database until you have the safety alarm. Send the email and then close the database. A record will be made. <br> </br> <b>3.</b> Contact Special Constable Service at <b><i>x22222</i></b> to notify them you wish to test your safety alarm. Provide them with your phone extension and office location. <br> </br> <b>4.</b> With Special Constable Service on the phone, push the safety alarm button for 5 full seconds. Watch for the red light to come on. <br></br> <b>If the red light does NOT come on when you test the button,</b> notify Special Constable Service that you will replace the battery and call them back. Click <b><font color= #1a98db><i>Report Unsuccessful Test</i></font></b> without sending the email. Proceed with replacing the battery and repeat Step 3. <br> </br> <b>5.</b> Confirm with Special Constable Service that they received a notification. <ul> <li>If Special Constable Service was <b> NOT</b> notified, you <i>must</i> report it to IST by clicking the <b><font color= #1a98db><i>Report Unsuccessful Test</i></font></b> button to send them an email. A record will be made. </li> <br> <li>If Special Constable Service <b>WAS</b> notified, click the <b><i><font color= #26ba23>Save</font></i></b> button to create a record of the test.</li> </ul> <b>7.</b> Repeat the steps above for each safety alarm you are assigned. Close the database when you are done."

The Save Button

The code for this button runs an IF function. It checks if all required fields are filled out (Full Name, Date, Building and Room Number). If any of them are blank, it will show an error notification at the top. If all fields are properly filled, it will save to the CW Safety Alarm App Testing Data list using the patch function (saving the Date of Test, Full Name, Building, Room Number, and additionally a value of successful in the results column). After saving the data it will show a notification saying “Success!” for 1.5 seconds.

If(IsBlank(cmbFullName.Selected.'Full Name') || IsBlank(datepicker.SelectedDate) || IsBlank(building_answer.Selected.Value) || IsBlank(room_answer.Value), Notify("Please fill in all the required fields.", NotificationType.Error), Patch('CW Safety Alarm App Testing Data', Defaults('CW Safety Alarm App Testing Data'), {Title:cmbFullName.Selected.'Full Name','Date of Test':datepicker.SelectedDate,Building:building_answer.Selected.Value,'Room Number':room_answer.Value,Result:"Successful"}); Notify("Saved!", NotificationType.Success, 1500) )

The Report Missing Safety Alarm Button

The code for this button runs an IF function. It checks if all required fields are filled out (Full Name, Date, Building and Room Number). If any of them are blank, it will show an error notification at the top.

If all fields are filled, it launches a pre-filled email as shown below:

Subject: Safety Alarm Missing

Body:

Hello!

This message is to inform you that a safety alarm is missing from [Building][Room Number] and that room requires a new one.

Please arrange to have one added to that office. Thank you.

It will save to the CW Safety Alarm App Testing Data list using the Patch function (saving the Date of Test, Full Name, Building, Room Number, and additionally a value of Missing in the results column). After saving the data it will show a notification saying “Success!” for 2 seconds.

If(IsBlank(cmbFullName.Selected.'Full Name') || IsBlank(datepicker.SelectedDate) || IsBlank(building_answer.Selected.Value) || IsBlank(room_answer.Value), Notify("Please fill in all the required fields.", NotificationType.Error), Launch("mailto:helpdesk@uwaterloo.ca" & "?bcc=lgchase@uwaterloo.ca, ckalbfle@uwaterloo.ca" & "&subject=" & EncodeUrl("Safety Alarm Missing") & "&body=" & EncodeUrl( "Hello!" & Char(10) & Char(10) & "This message is to inform you that a safety alarm is missing from " & building_answer.Selected.Value &" "& room_answer.Value & " and that room requires a new one." & Char(10) & Char(10) & "Please arrange to have one added to that office. Thank you.") ); Patch('CW Safety Alarm App Testing Data', Defaults('CW Safety Alarm App Testing Data'), {Title:cmbFullName.Selected.'Full Name','Date of Test':datepicker.SelectedDate,Building:building_answer.Selected.Value,'Room Number':room_answer.Value,Result:"Missing"}); Notify("Saved!", NotificationType.Success, 2000) )

The Report Unsuccessful Test Button

The code for this button runs an IF function. It checks if all required fields are filled out (Full Name, Date, Building and Room Number). If any of them are blank, it will show an error notification at the top.

If all fields are filled, it launches a pre-filled email as shown below:

Subject: Safety Alarm Not Working

Body:

Hello!

This message is to inform you of a safety alarm that was tested in [Building][Room Number] by [Full Name] on [Date of Test] that was unsuccessful.

Please reply to this message with instructions for correcting the issue. Thank you.

It will save to the CW Safety Alarm App Testing Data list using the Patch function (saving the Date of Test, Full Name, Building, Room Number, and additionally a value of Unsuccessful in the results column). After saving the data it will show a notification saying “Success!” for 2 seconds.

If(IsBlank(cmbFullName.Selected.'Full Name') || IsBlank(datepicker.SelectedDate) || IsBlank(building_answer.Selected.Value) || IsBlank(room_answer.Value), Notify("Please fill in all the required fields.", NotificationType.Error), Launch("mailto:helpdesk@uwaterloo.ca" & "?bcc=lgchase@uwaterloo.ca" & "&subject=" &     EncodeUrl("Safety Alarm Not Working") & "&body=" &     EncodeUrl(         "Hello!" & Char(10) & Char(10) &         "This message is to inform you of a safety alarm that was tested in " &         building_answer.Selected.Value &" "& room_answer.Value &         " by " & cmbFullName.Selected.'Full Name' & " on " & datepicker.SelectedDate & " that was unsuccessful." & Char(10) & Char(10) &         "Please reply to this message with instructions for correcting the issue. Thank you.") ); Patch('CW Safety Alarm App Testing Data', Defaults('CW Safety Alarm App Testing Data'), {Title:cmbFullName.Selected.'Full Name','Date of Test':datepicker.SelectedDate,Building:building_answer.Selected.Value,'Room Number':room_answer.Value,Result:"Unsuccessful"}); Notify("Saved!", NotificationType.Success, 2000) )

The View Test Results Button

Launch("https://uofwaterloo.sharepoint.com/:l:/r/sites/CampusWellness/IFAS/Lists/CWSafetyAlarmTesting?e=uMqtLW")