{"id":21,"date":"2014-05-22T05:41:00","date_gmt":"2014-05-22T10:41:00","guid":{"rendered":"http:\/\/www.teamdesk.net\/blog\/2014\/05\/show-available-inventory-items-within-selected-timeframe\/"},"modified":"2021-08-23T08:03:29","modified_gmt":"2021-08-23T13:03:29","slug":"show-available-inventory-items-within-selected-timeframe","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/","title":{"rendered":"Show available inventory items within selected timeframe"},"content":{"rendered":"<p>As a database user, you pretty often need to query inventory items that are available during a given timeframe. For example, you created a database to handle helicopters bookings. Each helicopter may be considered an inventory item that can be hired by a customer for a certain period of time. Ideally, when a new booking is made, only available helicopters should be brought to you by the system, but due to TeamDesk limitation there is no way to pass booking dates to a record picker for displaying available helicopters only. As a workaround, you may create a special dashboard that will display available helicopters for a given timeframe and use this dashboard for creating new booking records.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/1211.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-300\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/1211.png\" alt=\"12,1\" width=\"500\" height=\"513\" srcset=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/1211.png 500w, https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/1211-292x300.png 292w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Please follow these steps to implement the process:<\/p>\n<p>Step 1: (for example, there are &#8220;Bookings&#8221; and &#8220;Inventory Items&#8221; tables in your database)<\/p>\n<p>&#8211; Create a <a href=\"http:\/\/www.teamdesk.net\/help\/2.5.aspx\">User Property<\/a> Table. It allows keeping the last timeframe entered by a user.<\/p>\n<p>&#8211; Add the Start Date&amp;Time and End Date&amp;Time columns to this table to store a particular timeframe.<\/p>\n<p>&#8211; Add users to the User Property Table. If a user is not added there, he\/she won\u2019t be able to change the date range.<\/p>\n<p>Step 2: Create a &#8220;Filter&#8221; <a href=\"http:\/\/www.teamdesk.net\/help\/5.2.1.aspx\">table view<\/a> in the User Property Table.<\/p>\n<p>Set &#8220;User is the Current user&#8221; criteria in the &#8220;Filter&#8221; section and include the Start Date and End Date columns only.<\/p>\n<p>Step 3: Create a &#8220;Change Filter&#8221; <a href=\"http:\/\/www.teamdesk.net\/help\/11.1.aspx\">custom button<\/a>.<\/p>\n<p>&#8220;Change Filter&#8221; button settings are displayed on the screenshot.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/122.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-304\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/122.gif\" alt=\"12,2\" width=\"483\" height=\"371\"><\/a><\/p>\n<p>Step 4: Create a new &#8220;Number of bookings&#8221; summary column in the &#8220;Inventory Items&#8221; table and set the following formula in the Filter section:<\/p>\n<p>[Start Date&amp;Time]&lt;=User[End Date&amp;Time] and [End Date&amp;Time]&gt;=User[Start Date&amp;Time]<\/p>\n<p>and use &#8220;Aggregate: # of records&#8221; function.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/123.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-305\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/123.gif\" alt=\"12,3\" width=\"492\" height=\"398\"><\/a><\/p>\n<p>If the &#8220;Number of bookings&#8221; summary column brings 0 value, then a helicopter is available.<\/p>\n<p>Step 5: Create &#8220;Available Items&#8221; table view in the Inventory Items table.<\/p>\n<p>This view should use the following condition in the &#8220;Filter&#8221; section:<\/p>\n<p>Number of Bookings is 0<\/p>\n<p>Step 6: <a href=\"http:\/\/www.teamdesk.net\/help\/6.2.aspx\">Customize the Dashboard<\/a> for &#8220;Bookings&#8221; table and place the &#8220;Filter&#8221; view and &#8220;Available Items&#8221; view on this dashboard.<\/p>\n<p>You can check the above-mentioned adjustment in the <a href=\"http:\/\/www.teamdesk.net\/time_dependent_inventory.html\">Example: Time Dependent Inventory<\/a> database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can create a special dashboard that will display available inventory items (for example, helicopters) for a given time-frame and use this dashboard for creating new booking records.<\/p>\n","protected":false},"author":3,"featured_media":299,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[132,212],"class_list":["post-21","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-tricks","tag-database","tag-filtters"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Show available inventory items within selected timeframe - TeamDesk Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Show available inventory items within selected timeframe - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"You can create a special dashboard that will display available inventory items (for example, helicopters) for a given time-frame and use this dashboard for creating new booking records.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-22T10:41:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-23T13:03:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"513\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mila\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mila\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/\"},\"author\":{\"name\":\"Mila\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"headline\":\"Show available inventory items within selected timeframe\",\"datePublished\":\"2014-05-22T10:41:00+00:00\",\"dateModified\":\"2021-08-23T13:03:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/\"},\"wordCount\":378,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/05\\\/121.png\",\"keywords\":[\"database\",\"filtters\"],\"articleSection\":[\"Tips &amp; Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/\",\"name\":\"Show available inventory items within selected timeframe - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/05\\\/121.png\",\"datePublished\":\"2014-05-22T10:41:00+00:00\",\"dateModified\":\"2021-08-23T13:03:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/05\\\/121.png\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/05\\\/121.png\",\"width\":500,\"height\":513,\"caption\":\"Available Items\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/show-available-inventory-items-within-selected-timeframe\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Show available inventory items within selected timeframe\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\",\"name\":\"Mila\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"caption\":\"Mila\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/mila\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Show available inventory items within selected timeframe - TeamDesk Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/","og_locale":"en_US","og_type":"article","og_title":"Show available inventory items within selected timeframe - TeamDesk Blog","og_description":"You can create a special dashboard that will display available inventory items (for example, helicopters) for a given time-frame and use this dashboard for creating new booking records.","og_url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/","og_site_name":"TeamDesk Blog","article_published_time":"2014-05-22T10:41:00+00:00","article_modified_time":"2021-08-23T13:03:29+00:00","og_image":[{"width":500,"height":513,"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png","type":"image\/png"}],"author":"Mila","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mila","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/"},"author":{"name":"Mila","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"headline":"Show available inventory items within selected timeframe","datePublished":"2014-05-22T10:41:00+00:00","dateModified":"2021-08-23T13:03:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/"},"wordCount":378,"commentCount":1,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png","keywords":["database","filtters"],"articleSection":["Tips &amp; Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/","url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/","name":"Show available inventory items within selected timeframe - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png","datePublished":"2014-05-22T10:41:00+00:00","dateModified":"2021-08-23T13:03:29+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/05\/121.png","width":500,"height":513,"caption":"Available Items"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/show-available-inventory-items-within-selected-timeframe\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Show available inventory items within selected timeframe"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e","name":"Mila","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","caption":"Mila"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/mila\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":2,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":2435,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions\/2435"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media\/299"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}