# Special Functions/Codes

## Custom Code in Signs and Markings (SMD) Data Tracker

### Pulling Requester division into the "Requester" field automatically&#x20;

* LOCATION: New Signs Work Order - [`https://builder.knack.com/atd/signs-markings#pages/scene_1045/views/view_2633`](https://builder.knack.com/atd/signs-markings#pages/scene_1045/views/view_2633)
*   LOCATION: New Markings Work Order -&#x20;

    [`https://builder.knack.com/atd/signs-markings#pages/scene_711/views/view_1880`](https://builder.knack.com/atd/signs-markings#pages/scene_711/views/view_1880)
* BEHAVIOR:  User account set to "Transportation Engineering" in accounts table - when they create a new work order the Requester field will automatically populate with "Transportation Engineering" based on the logged in user. (**Viewer** roles only!)
* REASON: Users create so many work orders it is one less field they have to populate that we already capture when creating their accounts

ex. User account set to "Transportation Engineering" in accounts table - when they create a new work order the Requester field will automatically populate with "Transportation Engineering" based on the logged in user.

![This division is being populated here under the "Requester" field, user doesn't have to populate it ](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MX8oyHN4PV_mVsWkIVP%2F-MX8pvao-gM9OTznpMDb%2Fimage.png?alt=media\&token=b1cac517-d560-4a07-9edf-6194f8b6cdf0)

### **Attachments, showing up as "Plans", "Regulations" instead of the file name**

* LOCATION: Signs Work Order table (Main) - [`https://builder.knack.com/atd/signs-markings#pages/scene_1027`](https://builder.knack.com/atd/signs-markings#pages/scene_1027)
* CUSTOMIZATION: File Type is populated and it replaces the File Name to reduce table bloat
* REASON: File names can be long and take up lots of screen space, to save screen real estate and make table more simplified and readable

![Simple Name for Attachments, using Attachment Type to show on main table](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MX8oyHN4PV_mVsWkIVP%2F-MX8pXozgZycqiHLk3U_%2Fimage.png?alt=media\&token=3e9f87d8-539e-4db9-bf4f-1a99e15c79eb)

![Real name of attachments, some a very long and take up too much space](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MX8oyHN4PV_mVsWkIVP%2F-MX8pcz_SsDk_QNSVyOF%2Fimage.png?alt=media\&token=ac1a08b4-ba23-40a7-9a5f-a971d378e68f)

### Work Order Details, Status colors, showing up in the details portion

* LOCATION: Signs Work Order Details page - [`https://builder.knack.com/atd/signs-markings#pages/scene_1028`](https://builder.knack.com/atd/signs-markings#pages/scene_1028)
* CUSTOMIZATION: Work Order Status has background color that matches the display colors on the Work Order tables
* REASON: Users associate the work order colors to the work order statuses, easier to know what status a work order is at a glance

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MX8oIZh2GwUOs83EYHU%2F-MX8okSLUoZVNldZBNtO%2Fimage.png?alt=media\&token=f9e977a4-248c-4775-9915-b59bc487ce15)

### Geographic Map/Location Functionality

* LOCATION: Signs Work Order Details page - [`https://builder.knack.com/atd/signs-markings#pages/scene_1028`](https://builder.knack.com/atd/signs-markings#pages/scene_1028)
* BEHAVIOR: This affects only Signs Work Orders. Location map appears, Add Location fields are (hidden), When `Add location` button is clicked, it passes through the `Longitude`, `Latitude` fields and then creates map markers that links the `Location Details Page` , `Spatial ID`, `Latitude`, `Longitude` on the map instead of just the Locations table
* REASON: This allows the user to not have to go to the Locations table to figure out which location to choose when added asset information. There are many times where there are more locations on a work order.

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWW0tBYH7pH0uUbFtqW%2F-MWW5w8fzCsrxGFyK1Tn%2Fimage.png?alt=media\&token=2d328e85-7900-4add-98f3-e564c14976cc)

### "Back to Top" icon/enlarged text&#x20;

* LOCATION: Signs Work Order Details page - [`https://builder.knack.com/atd/signs-markings#pages/scene_1028`](https://builder.knack.com/atd/signs-markings#pages/scene_1028)(Visible at bottom of page)
* CUSTOMIZATION: Custom icon and enlarged text to navigate user back to top of page
* REASON: to help user not have to scroll all the way up to review information or click submit

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWW0tBYH7pH0uUbFtqW%2F-MWW6uvtdzuZBfs51X4P%2Fimage.png?alt=media\&token=7e12ea74-6cc4-4aa0-a971-cbc163273cc8)

### "Back to View Work Order Details" icon/enlarged text&#x20;

* &#x20;LOCATION: Signs Work Order Details page - [`https://builder.knack.com/atd/signs-markings#pages/scene_1039`](https://builder.knack.com/atd/signs-markings#pages/scene_1039)(Visible at bottom of page)
* CUSTOMIZATION: Custom icon and enlarged text to navigate user back to previous page
* REASON: to help user navigate back to previous page as it is not obvious at at the bottom of the page

## Mobile Optimizations

Code to determine what environment a user was in to recognize when to enable mobile optimizations

### Menu Buttons - Globally Enlarged

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWWAwUa962Pz1S-JQvR%2F-MWWDSEKYk5DfQtIC-u9%2Fimage.png?alt=media\&token=5add6d10-03e6-4373-ab05-de3609468de8)

### Form Field Headings - Globally Enlarged

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWWAwUa962Pz1S-JQvR%2F-MWWDqmyf_uskSNfquVD%2Fimage.png?alt=media\&token=d834a491-92ec-4bab-8c85-00eacc4e3334)

### Form Fields- Globally Enlarged

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWWAwUa962Pz1S-JQvR%2F-MWWDe5zMeiiZKaRtOth%2Fimage.png?alt=media\&token=baf7f9a6-9f32-46c0-b7b4-5bf2f300d8f6)

### Form Selections (Drop downs) - Global Enlarged

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWWAwUa962Pz1S-JQvR%2F-MWWDxAACJw7lXWkpEHR%2Fimage.png?alt=media\&token=86c5a807-1941-4b24-a443-331797f1e464)

### Submit Button - Globally Enlarged

![](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MWWAwUa962Pz1S-JQvR%2F-MWWDlIV2fHEeWiaFiIM%2Fimage.png?alt=media\&token=42b6869b-c49a-4e74-85d7-d0b6378f193a)
