{"id":2941,"date":"2019-03-25T17:41:56","date_gmt":"2019-03-25T20:41:56","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/kb31793-creating-links-via-scripts\/"},"modified":"2019-05-22T13:03:21","modified_gmt":"2019-05-22T16:03:21","slug":"kb31793-creating-links-via-scripts","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/","title":{"rendered":"KB-31793: Creating links via scripts."},"content":{"rendered":"<div style=\"text-align: justify;\" align=\"justify\">\n<p><span style=\"font-weight: bold;\">Question:<\/span><\/p>\n<p>How can I create links via scripts?<\/p>\n<p><span style=\"font-weight: bold;\">Solution:<\/span><\/p>\n<p>To do so, you must use the <span style=\"font-style: italic;\">CreateLink()<\/span> method of the object with which you want to create the link.<\/p>\n<div style=\"text-align: left;\">The complete command is: <span style=\"font-family: Courier New; color: #000000;\">CreateLink(Property, Source [,Type])<\/span><\/div>\n<p>where:<\/p>\n<p><span style=\"font-weight: bold;\">Property<\/span>: sets the name of the property with which the link will be created.<br \/>\n<span style=\"font-weight: bold;\">Source<\/span>: sets the name of the origin-object of the link.<br \/>\n<span style=\"font-weight: bold;\">Type <\/span>(optional): sets the type of link to be created. If this parameter is omitted, a simple link is created.<\/p>\n<p>And the types of link (<span style=\"font-weight: bold;\">Type <\/span>field) are:<br \/>\n<span style=\"font-weight: bold;\">0 &#8211;<\/span> Simple link<br \/>\n<span style=\"font-weight: bold;\">1 &#8211;<\/span> Bidirectional link<br \/>\n<span style=\"font-weight: bold;\">2 &#8211;<\/span> Analog link<br \/>\n<span style=\"font-weight: bold;\">3 &#8211;<\/span> Digital link<br \/>\n<span style=\"font-weight: bold;\">4 &#8211;<\/span> Table link<br \/>\n<span style=\"font-weight: bold;\">5 &#8211;<\/span> Reverse link<br \/>\n<span style=\"font-weight: bold;\">6 &#8211;<\/span> Multiple link<\/p>\n<\/div>\n<pre><strong><u>Script creating a simple link: \r\n<\/u><\/strong><span style=\"font-family: Courier New;\">Source\u00a0\u00a0= \"Data.Tag.Value\" 'Link source string\r\n<\/span><span style=\"font-family: Courier New;\">Set Obj = Screen.Item(\"Text1\")<\/span>\r\n<span style=\"font-family: Courier New;\">Set Bind = Obj.Links.CreateLink(\"Value\", Source, 0) 'CreateLink (Property string, Source string, 0)<\/span>\r\n\r\n<strong><u><strong><u>Script creating a<\/u><\/strong> bidirectional link:<\/u><\/strong><b><u>\r\n<\/u><\/b><span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source string\r\nSet Obj = Screen.Item(\"Text1\")\r\nSet Bind = Obj.Links.CreateLink(\"Value\", Source, 1) 'CreateLink (<\/span><span style=\"font-family: Courier New;\">Property string, Source string<\/span><span style=\"font-family: Courier New;\">, 1)<\/span>\r\n\r\n<u><\/u><strong><u>Script creating an analog link<\/u><\/strong><strong><u>:<\/u><\/strong>\r\n<span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source integer\r\nSet Obj = Screen.Item(\"Text1\")\r\nSet Bind = Obj.Links.CreateLink(\"Value\", Source, 2) 'CreateLink (Property string, Source string<span id=\"anchor_div\"> <\/span>, 2)\r\nBind.SrcHiValue = 1 \u2018Source highest value\r\nBind.SrcLoValue = 0 \u2018Source lowest value\r\nBind.DstHiValue = 100 \u2018Property highest value\r\nBind.DstLoValue = 0\u00a0 \u2018Property lowest value\r\n<\/span>\r\n\r\n<strong><u><strong><u>Script creating digital link<\/u><\/strong><\/u><\/strong><strong><u>:<\/u><\/strong><b><u>\r\n<\/u><\/b><span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source Boolean\r\nSet Obj = Screen.Item(\"Text1\")\r\nset Bind = obj.Links.CreateLink(\"Value\", Source, 3) 'CreateLink (Property string, Source string, 3)\r\nBind.OnValue = \"Text ON\"\r\nBind.OffValue = \"Text OFF\"<\/span>\r\n\r\n<strong><u>Script creating a table link:<\/u><\/strong>\r\n<span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source integer\r\nSet Obj = Screen.Item(\"Text1\")\r\nSet Bind = Obj.Links.CreateLink(\"ForegroundColor\", Source, 4) 'CreateLink (Property string, Source string, 4)\r\nBind.InsertRow()\r\nBind.Item(1).Value = RGB(255,0,0)\r\nBind.Item(1).Min = 0\r\nBind.Item(1).Max = 10<\/span>\r\n\r\n<strong><u>Script creating a reverse link:<\/u><\/strong>\r\n<span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source string\r\nSet Obj = Screen.Item(\u201cText1\u201d)\r\nSet Bind = Obj.Links.CreateLink(\"Value\", Source, 5) 'CreateLink (Property string, Source string, 5)<\/span>\r\n\r\n<strong><u>Script creating a multiple link:<\/u><\/strong><b><u>\r\n<\/u><\/b><span style=\"font-family: Courier New;\">Source = \"Data.Tag.Value\" 'Link source integer\r\nTag1 = \"Data.Tag1.Value\" 'Row 1 source tag\r\nSet Obj = Screen.Item(\"Text1\")\r\nSet Bind = Obj.Links.CreateLink(\"Value\", Source, 6) 'CreateLink (Property string, Source string, 6)\r\nBind.InsertRow()\r\nBind.Item(1).Source = Tag1\r\nBind.Item(1).Min = 0\r\nBind.Item(1).Max = 10<\/span><span id=\"anchor_div\"> <\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Autor<br \/>\nIrene Rodrigues<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[754,763],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KB-31793: Creating links via scripts. - Elipse Knowledgebase<\/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:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB-31793: Creating links via scripts.\" \/>\n<meta property=\"og:description\" content=\"Autor Irene Rodrigues\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:41:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-22T16:03:21+00:00\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"KB-31793: Creating links via scripts.\",\"datePublished\":\"2019-03-25T20:41:56+00:00\",\"dateModified\":\"2019-05-22T16:03:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\"},\"wordCount\":118,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Links\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\",\"name\":\"[:pt]KB-31793: Creating links via scripts.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:41:56+00:00\",\"dateModified\":\"2019-05-22T16:03:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB-31793: Creating links via scripts.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KB-31793: Creating links via scripts. - Elipse Knowledgebase","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:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]KB-31793: Creating links via scripts.[:] - Elipse Knowledgebase","og_description":"[:pt]Autor Irene Rodrigues[:]","og_url":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:41:56+00:00","article_modified_time":"2019-05-22T16:03:21+00:00","author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"KB-31793: Creating links via scripts.","datePublished":"2019-03-25T20:41:56+00:00","dateModified":"2019-05-22T16:03:21+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/"},"wordCount":118,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Links","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/","url":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/","name":"[:pt]KB-31793: Creating links via scripts.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:41:56+00:00","dateModified":"2019-05-22T16:03:21+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/kb31793-creating-links-via-scripts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"KB-31793: Creating links via scripts."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2941"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=2941"}],"version-history":[{"count":8,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2941\/revisions"}],"predecessor-version":[{"id":6471,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2941\/revisions\/6471"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=2941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=2941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=2941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}