{"id":1553,"date":"2018-03-16T10:13:49","date_gmt":"2018-03-16T09:13:49","guid":{"rendered":"https:\/\/help.cirrus-shield.com\/docs\/developer-guide\/javascript-library\/get-data-by-column\/"},"modified":"2024-12-20T15:10:44","modified_gmt":"2024-12-20T14:10:44","slug":"get-data-by-column","status":"publish","type":"docs","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-data-by-column\/","title":{"rendered":"Get Data By Column"},"content":{"rendered":"<p>This function is used to get the record details based on the column name and value provided and it returns the data of the field names provided.<\/p>\n<p><strong>Function:<\/strong> GetDataByColumn(&lt;Column Name&gt;, (&lt;Column Value&gt;, &lt;Object Name&gt;, &lt;Field Names&gt;)<\/p>\n<p><strong style=\"color: initial;\">Optional Parameter:<\/strong><span style=\"color: initial;\"> useLocaleFormatting [bool]: allows returning fields of type Date\/DateTime\/Number\/Currency\/Percent in the user&#8217;s locale format. translate to french<\/span><\/p>\n<p><strong>Usage:<\/strong> var Task = GetDataByColumn(&#8220;Name&#8221;, &#8220;Annual Meeting \u2013 ABC 2016&#8243;,&#8221;Task&#8221;,&#8221;Id,Name,Start,End,Description,Location,Attendees,OwnerId&#8221;);Output:Success:The object can be used like this:<\/p>\n<p>If the result returns only 1 record:Task.IdTask.NameIf the result returns more than 1 record:<\/p>\n<p style=\"padding-left: 120px;\">var Events = GetDataByColumn(&#8220;Lead&#8221;, GetRecordGUID(), &#8220;Event&#8221;, &#8220;Id&#8221;);<\/p>\n<p style=\"padding-left: 120px;\">if (Events != null) {<\/p>\n<p style=\"padding-left: 150px;\">if (Events.length != undefined) {<\/p>\n<p style=\"padding-left: 180px;\">for (var i = 0; i &lt; Events.length; i++) {<\/p>\n<p style=\"padding-left: 210px;\">Events[i].Id;<\/p>\n<p style=\"padding-left: 180px;\">}<\/p>\n<p style=\"padding-left: 150px;\">}<\/p>\n<p style=\"padding-left: 120px;\">}<\/p>\n<p>Failure:An error message will be displayed<\/p>\n<p><!-- 5884106a0400bd2499487d47d4dd265b --><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":945,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_tag":[],"class_list":["post-1553","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/comments?post=1553"}],"version-history":[{"count":7,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1553\/revisions"}],"predecessor-version":[{"id":11194,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1553\/revisions\/11194"}],"up":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/945"}],"next":[{"title":"Create Record","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/create-record\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1554"}],"prev":[{"title":"Get Data By ID","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-data-by-id\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1552"}],"wp:attachment":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/media?parent=1553"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/doc_tag?post=1553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}