Asset tracking

//Asset tracking

Asset tracking

You have company assets you’d like to track such as when it was purchased, how much it cost at the time, who’s responsible for it, and reminders of when service is coming due.  You also want to to ensure that any maintenance is being done on time and that there is a record of the activity; who and when

What we will do is create a list, lets call it “Assets” then create another list called “maintenance” and link the two together such that when a user clicks “Record maintenance activity” it will open our maintenance list to record our actions. 

The most powerful way to do this is through a two scripts; one that passes the ID or our parent and the other that creates a new maintenance record with the ID of the parent asset.

<!--
    Name: dispParent.js
-->


<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>

<script type="text/javascript">

jQuery(document).ready(function($) {

    //get the ID for the Issue from the Query String
    var issueID = getParameterByName("ID");

    //find the element with the "Add new item" link.
    //note that if you have more than one list on your page, this just finds the first one
    //var anchorElement = $("a[title='Add a new item to this list or library.']");
     var anchorElement = $("a:contains('new item')");

    
    //modify the "Add new item" link to call the "NewItem2" function and pass in the Issue ID. 
   //Be sure to put the path to your site below. You can use relative URL to the web application or the FQDN
    $(anchorElement).attr("href","javascript:NewItem2(event,'http://odin/rotomaster/test/Lists/RecItems/NewForm.aspx?IssueID="  + issueID + "&Source=http://odin/rotomaster/test/Lists/RecLog/DispForm.aspx?ID=" + issueID + "');");
    //remove the "onclick" attribute from the anchor element as we aren't using it anymore
    $(anchorElement).removeAttr("onclick");

});

// The following function should really be put into a utility library
// with all of your commonly called functions
//
// no, I didn't write this function from scratch, I found it at
// http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript
function getParameterByName(name)
{
  name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
  var regexS = "[\\?&]" + name + "=([^&#]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.href);
  if(results == null)
    return "";
  else
    return decodeURIComponent(results[1].replace(/\+/g, " "));
}

</script>




<!--
    Name: newChild.js 
    
<script type="text/javascript" src="http://odin/adpusa/SiteAssets/jquery-3.1.1.slim.min.js"></script>
-->
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>


<script type="text/javascript">

jQuery(document).ready(function($) {

    //get the Issue ID from they query string
    var issueID = getParameterByName("IssueID");
    
    //Set the corresponding Lookup field value to the Issue ID
       $("select[title='Issue']").val(issueID);    
       //use this line to disable the lookup field selection
       $("select[title='Issue']").attr('disabled','disabled')
       //use this line to hide the lookup field and label entirely
       //$("select[title='Issue']").closest("tr").hide();    
    
});

// no, I didn't write this function from scratch, I found it at
// http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript
function getParameterByName(name)
{
  name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
  var regexS = "[\\?&]" + name + "=([^&#]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.href);
  if(results == null)
    return "";
  else
    return decodeURIComponent(results[1].replace(/\+/g, " "));
}

</script>

If we want to improve the usability of this assets tracking system, lets expand it to include both Scheduled and unscheduled maintenance (Planned and unplanned).

The above technique just records unplanned maintenance. but what if we have a regular schedule of activities that apply to a piece of equipment?

We add an additional “Calendar” web part to this list. The calendar lets us add both one time events and recurrent events, such as oil changes, filter changes, NDT inspections, service plans, cleaning, etc.

Options for creating a recurring event such as a planned maintenance activity

We then add a lookup column in our “Calendar” list, or we’ll call it our “Planned Maintenance schedule” from our “assets list”.

Once we have activities added to our planned maintenance schedule, we can have them appear in our Outlook calendar;

Connect your maintenance plans to your Outlook calendar

Our Assets tracking system now has recordings of both planned and unplanned maintenance activity has the standard time and date stamp as well as the logged in user.

Implement version tracking and your are ready for any maintenance audit to come your way.

These techniques have helped organizations meet ISO 9001 quality system requirements, government safety audits, ISM code audits, EMS audits, IATF 16949, customer audits and just about any other audit requiring tracking of who, what, when and where.

By | 2019-12-29T19:46:51+00:00 May 2nd, 2019|Uncategorized|0 Comments

About the Author:

Leave a Reply