{"id":2377,"date":"2014-10-06T10:31:28","date_gmt":"2014-10-06T09:31:28","guid":{"rendered":"http:\/\/www.solidapps.co.uk\/blog\/?p=2377"},"modified":"2014-10-06T10:31:28","modified_gmt":"2014-10-06T09:31:28","slug":"driveworks-administrator-table-lookups-using-dwvlookup","status":"publish","type":"post","link":"https:\/\/www.solidapps.co.uk\/blog\/2014\/10\/driveworks-administrator-table-lookups-using-dwvlookup\/","title":{"rendered":"DriveWorks Administrator &#8211; Table Lookup&#8217;s Using DWVLookup"},"content":{"rendered":"<p>DWVLookup in DriveWorks Pro Administrator, returns a value from a table corresponding to a match found in the specified column.<\/p>\n<h2>Syntax<\/h2>\n<p><span style=\"font-size: small;\"><span style=\"font-family: Courier New;\"><strong>DWVLOOKUP<\/strong>( [ <span style=\"color: navy;\"><span style=\"color: #000000;\">Value], [<\/span><span style=\"color: #ff0000;\">Table Name<\/span><span style=\"color: #000000;\">], [<\/span><span style=\"color: #008000;\">Lookup Column<\/span><span style=\"color: #000000;\">], [<\/span><span style=\"color: #0000c0;\">Result Column Index<\/span><span style=\"color: #000000;\">], [<\/span><\/span><span style=\"color: #800080;\">MatchType<\/span><span style=\"color: #000000;\">] )<\/span><\/span><\/span><\/p>\n<p>[Value] is the value to be found.<\/p>\n<p>[Table Name] is the table within which the value is to be found.<\/p>\n<p>[Lookup Column] is the number of the column containing the data to be searched for.<\/p>\n<p>[Result Column Index] is the number of the column containing the data to be returned.<\/p>\n<p>[MatchType] defines whether the match has to be exact or the nearest found.<\/p>\n<p>&nbsp;<\/p>\n<p>The video below shows an example of the DWVLookup function in action.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube-nocookie.com\/embed\/DtT_qTO28uw?rel=0\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h2>Examples<\/h2>\n<table style=\"border-width: 0px;\" cellspacing=\"0\" cellpadding=\"0\">\n<thead>\n<tr>\n<th>\n<h3>Rule<\/h3>\n<\/th>\n<th>\n<h3>Meaning<\/h3>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"CodeOrRule\"><span style=\"color: #000000; font-size: small;\">DWVLOOKUP(CarColourComboBoxReturn, Vehicles, 3, 2, FALSE)<\/span><\/td>\n<td>The function looks in the Vehicles table for a match, in the third column of the table, to the value returned from the CarColourComboBox. If a match is found, the function then looks across to the second column and returns the value in the same row as the match found. The user has also specified that the match needs to be exact (denoted by the FALSE term). In this case, the Car Colour selected in the combo box is &#8220;Blue&#8221;, so the function returns &#8220;Golf&#8221;.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Example Outcomes<\/h2>\n<table style=\"border-width: 0px;\" cellspacing=\"0\" cellpadding=\"0\">\n<thead>\n<tr>\n<th>\n<h3 style=\"text-align: center;\">Lookup<\/h3>\n<\/th>\n<th>\n<h3 style=\"text-align: center;\">In<\/h3>\n<\/th>\n<th>\n<h3 style=\"text-align: center;\">LookupColumn<\/h3>\n<\/th>\n<th>\n<h3 style=\"text-align: center;\">ReturnColumn<\/h3>\n<\/th>\n<th>\n<h3 style=\"text-align: center;\">MatchType<\/h3>\n<\/th>\n<th>\n<h3 style=\"text-align: center;\">Outcome<\/h3>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">&#8220;Blue&#8221;<\/td>\n<td style=\"text-align: center;\">Vehicles<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">False (Exact)<\/td>\n<td style=\"text-align: center;\">&#8220;Golf&#8221;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">&#8220;White&#8221;<\/td>\n<td style=\"text-align: center;\">Vehicles<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">False (Exact)<\/td>\n<td style=\"text-align: center;\">&#8220;Renault&#8221;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">26<\/td>\n<td style=\"text-align: center;\">People<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">True (Nearest)<\/td>\n<td style=\"text-align: center;\">&#8220;Dave Sharp&#8221;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">42<\/td>\n<td style=\"text-align: center;\">People<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">4<\/td>\n<td style=\"text-align: center;\">False (Exact)<\/td>\n<td style=\"text-align: center;\">Female<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Example Data<\/h2>\n<h3>Vehicles Table<\/h3>\n<table style=\"border-width: 0px;\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<th>\n<h3>Make<\/h3>\n<\/th>\n<th>\n<h3>Model<\/h3>\n<\/th>\n<th>\n<h3>Colour<\/h3>\n<\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">Volkswagen<\/td>\n<td style=\"text-align: center;\">Golf<\/td>\n<td style=\"text-align: center;\">Blue<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">Ford<\/td>\n<td style=\"text-align: center;\">Escort<\/td>\n<td style=\"text-align: center;\">Red<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">Renault<\/td>\n<td style=\"text-align: center;\">Kangoo<\/td>\n<td style=\"text-align: center;\">White<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">Mazda<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">Black<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>People Table<\/h3>\n<table style=\"border-width: 0px;\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<th>\n<h3>Member ID<\/h3>\n<\/th>\n<th>\n<h3>Name<\/h3>\n<\/th>\n<th>\n<h3>Age<\/h3>\n<\/th>\n<th>\n<h3>Gender<\/h3>\n<\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">42<\/td>\n<td style=\"text-align: center;\">Dave Sharp<\/td>\n<td style=\"text-align: center;\">25<\/td>\n<td style=\"text-align: center;\">Male<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">44<\/td>\n<td style=\"text-align: center;\">Joe Bloggs<\/td>\n<td style=\"text-align: center;\">37<\/td>\n<td style=\"text-align: center;\">Male<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">96<\/td>\n<td style=\"text-align: center;\">Sandra Shield<\/td>\n<td style=\"text-align: center;\">42<\/td>\n<td style=\"text-align: center;\">Female<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">107<\/td>\n<td style=\"text-align: center;\">Thomas Knight<\/td>\n<td style=\"text-align: center;\">21<\/td>\n<td style=\"text-align: center;\">Male<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">251<\/td>\n<td style=\"text-align: center;\">Isabelle Jones<\/td>\n<td style=\"text-align: center;\">56<\/td>\n<td style=\"text-align: center;\">Female<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2090\" src=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\" alt=\"DoubleRedArrow\" width=\"15\" height=\"10\" \/><\/a>\u00a0<a href=\"http:\/\/www.solidapps.co.uk\/products\/products-automation\" target=\"_blank\"><span style=\"color: #830000;\">Find out more on DriveWorks<\/span><\/a><br \/>\n<a href=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\"><span style=\"color: #830000;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2090\" src=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\" alt=\"DoubleRedArrow\" width=\"15\" height=\"10\" \/><\/span><\/a>\u00a0<a href=\"http:\/\/www.solidapps.co.uk\/company\/contact\" target=\"_blank\"><span style=\"color: #830000;\">Contact Sales<\/span><\/a><br \/>\n<a href=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\"><span style=\"color: #830000;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2090\" src=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/DoubleRedArrow.png\" alt=\"DoubleRedArrow\" width=\"15\" height=\"10\" \/><\/span><\/a>\u00a0<a href=\"http:\/\/www.solidapps.co.uk\/demo-request\" target=\"_blank\"><span style=\"color: #830000;\">Request a Demo<\/span><\/a><\/p>\n<p><a href=\"http:\/\/mkt.solidworks.com\/emarketing_enu\/start.swe?SWECmd=InvokeMethod&amp;SWEMethod=StartSS&amp;SWEView=URLRouter&amp;SWEApplet=SSRoute&amp;SWENargs=SSId=1-2NK0I3R,SSName=REP+ENG-INTL+SW+3D+for+2D+-+Analyzing+Assemblies,SSLC=,SSCC=,CID=1-2OC1GI7,OID=1-2NJB5DC,COID=1-2OC1GI8,PRO=1-NKZ7N\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2524\" src=\"http:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/REP_3Dfor2DEngineering_Analyzing_Assemb_600x90_SAL.jpg\" alt=\"REP_3Dfor2DEngineering_Analyzing_Assemb_600x90_SAL\" width=\"600\" height=\"90\" srcset=\"https:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/REP_3Dfor2DEngineering_Analyzing_Assemb_600x90_SAL.jpg 600w, https:\/\/www.solidapps.co.uk\/blog\/wp-content\/uploads\/REP_3Dfor2DEngineering_Analyzing_Assemb_600x90_SAL-300x45.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DWVLookup in DriveWorks Pro Administrator, returns a value from a table corresponding to a match found in the specified column. Syntax DWVLOOKUP( [ Value], [Table Name], [Lookup Column], [Result Column&hellip; <\/p>\n","protected":false},"author":1,"featured_media":2387,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[116,37],"class_list":["post-2377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-driveworks","tag-driveworks","tag-hints-tips"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2377"}],"version-history":[{"count":12,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2377\/revisions"}],"predecessor-version":[{"id":2534,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2377\/revisions\/2534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/media\/2387"}],"wp:attachment":[{"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.solidapps.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}