{"id":56082,"date":"2022-07-22T16:31:03","date_gmt":"2022-07-22T08:31:03","guid":{"rendered":"https:\/\/oihelp.corporate.ifs.com\/help\/?page_id=56082"},"modified":"2024-08-15T10:31:33","modified_gmt":"2024-08-15T02:31:33","slug":"value","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/value\/","title":{"rendered":"Value()"},"content":{"rendered":"\n<h2>Format<\/h2>\n<p class=\"intro-text\"><strong>ValueCount(Arg1 ,ValueIndex [,DefaultValue])<\/strong><\/p>\n<h2>Returns<\/h2>\n<p class=\"intro-text\">Returns the\u00a0value of an item as a single value variable (i.e. without metadata like timestamp, confidence, etc.) from the given collection variable.<\/p>\n<h2>Inputs<\/h2>\n<p class=\"intro-text\"><b>Arg1: <\/b>The collection variable (e.g. tag) which contains the item whose value is to be returned.<br \/>\nBehaviour: Required<br \/>\nDimensions: Collection<br \/>\nValid data types: Null, Boolean, DateTime, Decimal, Integer, String, Duration, Error<\/p>\n<p class=\"intro-text\"><b>ValueIndex: <\/b>The zero-based index of the item whose value is to be returned. Keywords like \"first\" and \"last\" can be used to refer to the first and last item in the collection, respectively.<br \/>\nBehaviour: Required<br \/>\nDimensions: SingleValue<br \/>\nValid data types: Decimal, Integer, String<\/p>\n<p class=\"intro-text\"><b>DefaultValue: <\/b>Default value which will be returned if the specified item was not found in the collection variable.<br \/>\nBehaviour: Optional<br \/>\nDimensions: SingleValue<br \/>\nValid data types: Null, Boolean, DateTime, Decimal, Integer, String, Duration, Error<\/p>\n<p class=\"left-bar\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/#Data_Type\">How to format data types<\/a><\/p>\n<h2>Examples<\/h2>\n<p class=\"intro-text\">Expression: Value({Tag1}, 0)<br \/>\nResult: Returns the value of the first item that was fetched for {Tag1}.<\/p>\n<p class=\"intro-text\">Expression: Value({Tag1}, 'first')<br \/>\nResult: Returns the value of the first item that was fetched for {Tag1}.<\/p>\n<p class=\"intro-text\">Expression: Value({Tag1}, 4, 0)<br \/>\nResult: Returns the value of the fifth item that was fetched for {Tag1} however if it was not found then it returns the default value, 0.<\/p>\n<p class=\"note\"><strong>Note:\u00a0<\/strong>The function is applied to fetched data, it does not affect the way data is fetched.<\/p>\n<h2>Release History<\/h2>\n<ul class=\"intro-text\">\n<li>Value() 4.10.4\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Returns the value of an item as a single value variable from the given collection variable. <\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/value\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":29,"featured_media":56084,"parent":3650,"menu_order":242,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100],"class_list":["post-56082","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","Version-4-10-4","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/56082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=56082"}],"version-history":[{"count":9,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/56082\/revisions"}],"predecessor-version":[{"id":64903,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/56082\/revisions\/64903"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/56084"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=56082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=56082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=56082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}