{"id":521,"date":"2023-05-19T21:44:00","date_gmt":"2023-05-19T21:44:00","guid":{"rendered":"https:\/\/automatethemundane.com\/index.php\/2023\/05\/19\/hours-tracker-part-2-hours-tracker-table-build\/"},"modified":"2023-06-29T15:21:03","modified_gmt":"2023-06-29T15:21:03","slug":"hours-tracker-part-2-hours-tracker-table-build","status":"publish","type":"post","link":"https:\/\/automatethemundane.com\/index.php\/2023\/05\/19\/hours-tracker-part-2-hours-tracker-table-build\/","title":{"rendered":"Hours Tracker Part 2-Hours Tracker Table Build"},"content":{"rendered":"\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgba(120, 119, 116, 1)\">5\/19\/2023<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">The Why<\/h1>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">This part of the guide will go through two sections. <\/p>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">Building Dataverse tables  <\/p>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">Extending built in Datavere tables. <\/p>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">It is best to extend the user table and build a relationship between the new custom tables, instead of building a whole new user table. This minimizes the number of tables in the environment and allows us to build reusable columns that may be used in different solutions.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">The How<\/h1>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">Using the previous <a href=\"https:\/\/automatethemundane.com\/index.php\/2023\/05\/19\/hours-tracker-part-1-project\/\" data-type=\"post\" data-id=\"522\" target=\"_blank\" rel=\"noreferrer noopener\">guide <\/a>and ERD we will make the two tables and extend the user table. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">The solution  for this project will be called Hours Tracker. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/solution-1024x473.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Solution<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Custom Tables<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Project Table<\/h3>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">The Projects table is \u201ccurrently\u201d a single row table. It needs a primary column called Project Name. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/project-table.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Project Table<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Team Table<\/h2>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/primary-column.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Primary Column<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">The Team table will be the same as the projects table. It is a single column table Team and Team Name.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/team-table.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Team Table<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/primary-column-1.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Primary Column<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Hours Table<\/h3>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">The Hours table is a custom table that uses a primary column called Hours Name. This will become an auto number column that we will need to adjust after its creation. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/image-8.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-82.png\" alt=\"\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">Edit the column to be a auto number column. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/image-10-1024x620.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Columns<\/h3>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">We are going to create three custom columns<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Hours\n<ol class=\"wp-block-list\">\n<li>Name-Hours<\/li>\n\n\n\n<li>Type-Decimal<\/li>\n\n\n\n<li>Required-Yes<\/li>\n\n\n\n<li>Min value-.05<\/li>\n\n\n\n<li>Max Value-14\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-83.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Lead Verify\n<ol class=\"wp-block-list\">\n<li>Name-Lead Verify<\/li>\n\n\n\n<li>Type-Yes\/No\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-84.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Date Worked\n<ol class=\"wp-block-list\">\n<li>Name-Date Worked<\/li>\n\n\n\n<li>Type-Date Only<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/image-11.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Lookup Columns<\/h3>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">There are two lookup columns in the Hours table<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Projects\n\n<ol class=\"wp-block-list\">\n<li>Name-Project<\/li>\n\n\n\n<li>Type-Lookup<\/li>\n\n\n\n<li>Related Table-Project<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-85.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>User\n<ol class=\"wp-block-list\">\n<li>Name-User<\/li>\n\n\n\n<li>Type-Lookup<\/li>\n\n\n\n<li>Related Table-User<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-86.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:rgb(241, 241, 239)\">\ud83d\udca1 Note: I decided to use the User table and extend it out vs creating joiner table.<\/p>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:rgb(0, 0, 0)\">In the next guide we will go through extending the User Table and building a N:N relationship to the Projects Table.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>5\/19\/2023 The Why This part of the guide will go through two sections. Building Dataverse tables Extending built in Datavere tables. It is best to extend the user table and build a relationship between the new custom tables, instead of building a whole new user table. This minimizes the number of tables in the environment [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,35],"tags":[25],"class_list":["post-521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-design","category-tables","tag-dataverse","entry","has-media"],"jetpack_featured_media_url":"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/cover-6-scaled.jpg","_links":{"self":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":1,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/521\/revisions\/527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media\/258"}],"wp:attachment":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}