Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating an asset maintenance history

Featured Replies

  • Newbies

Hi everyone,

 

This may seem pretty basic to most but I am a very new user.

I have managed to create my asset database with the following fields:

MAKE - TYPE - SERIAL NUMBER - SERVICE DATE

I have scripted a button to enable me to click on a record in portal and update the service date to current date (pretty easy).

What I would like is to be able to store each date the item was serviced and have a list of those dates appear inside a pop up when a SERVICE HISTORY button is pressed.

I have been trying to script it so each time the SERVICE button is pressed it updates the SERVICE DATE field with current date and also stores that date is a corresponding field or another table, I just can't figure out how to do it.

 

Any help greatly appreciated

 

I would suggest you use two tables: Assets and Maintenance, related by AssetID (or by serial number, assuming it is unique). Then have your script create a new related record in the Maintenance - something like:

Set Variable [ $assetID; Assets::AssetID ]
Go to Layout [ Maintenance ]
New Record/Request
Set Field [ Maintenance::AssetID; $assetID ]
Set Field [ Maintenance::ServiceDate; Get ( CurrentDate ) ] 
Go to Layout [ original layout ]

To protect against accidentally hitting the button twice, you could wrap this in:

If [ Max ( Maintenance::MaintenanceDate ) < Get ( CurrentDate ) ]
  ...
End If

This ensures the correct data structure and enables you to build any user interface you want. For example, you can show the asset's service dates in a portal to the Maintenance table.

 

  • Author
  • Newbies

Thank you for the reply

So would this essentially create a new record in the maintenance table every time the service button is pressed? Then I could run a find to show all the records of that serial number in the maintenance table.

I assume I would create the maintenance table with two fields - serial number and service date. Then connect with a relationship between the serial number field of both?

 

Sorry again, I've only been playing with this for a day or so and am still getting to grips with how to link two tables.

I also want to eventually record spare parts changed via a check box at service perhaps.

Starting one step at a time. It's a lot to learn.

 

Thanks again

 

19 hours ago, armourer said:

would this essentially create a new record in the maintenance table every time the service button is pressed?

Yes.

19 hours ago, armourer said:

Then I could run a find to show all the records of that serial number in the maintenance table.

There is no need to "run a find". Use the relationship to access related records. If you like, you can think of a  relationship as a kind of a "permanent find".

To show related records, use a portal. Or, to show them in their own table, use the Go to Related Record[] script step to convert the related set to a found set.

 

Edited by comment

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.