{"id":10010,"date":"2016-02-23T15:22:40","date_gmt":"2016-02-23T07:22:40","guid":{"rendered":"http:\/\/localhost\/help\/p2-server\/calculations\/catcherrorornosamples\/"},"modified":"2024-01-16T12:20:48","modified_gmt":"2024-01-16T04:20:48","slug":"catcherrorornosamples","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/catcherrorornosamples\/","title":{"rendered":"CatchErrorOrNoSamples()"},"content":{"rendered":"\n<h2><span id=\"Format\">Format<\/span><\/h2>\n<p class=\"intro-text\"><strong>CatchErrorOrNoSamples(Arg1 ,DefaultValue)<\/strong><\/p>\n<h2><span id=\"Returns\">Returns<\/span><\/h2>\n<p class=\"intro-text\">Returns the value of <em>Arg1<\/em>, unless an error occurs while evaluating it or it contains no samples, in which case the value of <em>Default\u00a0<\/em>is returned instead.<\/p>\n<h2>Inputs<\/h2>\n<p class=\"intro-text\"><strong>Arg1<\/strong>: The argument being checked for errors and lack of samples or data.<br \/>\nBehaviour: Required<br \/>\nDimension: Error, Collection, SingleValue, Matrix,MultiCollection<br \/>\nValid\u00a0data types: Null, Boolean, DateTime, Decimal, Integer, String, Duration, Error<\/p>\n<p class=\"intro-text\"><strong>DefaultValue<\/strong>:\u00a0The value to be returned if an error occurs or the data has no samples. Must be a constant.<br \/>\nBehaviour:\u00a0Required<br \/>\nDimension: SingleValue<br \/>\nValid data types: Null, Boolean, DateTime, Decimal, Integer, String, Duration<\/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><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>CatchErrorOrNoSamples() 4.6.5\n<ul class=\"intro-text\">\n<li>Changed Arg1 parameter to support MultiCollection values.<\/li>\n<\/ul>\n<\/li>\n<li>CatchErrorOrNoSamples() 4.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use CatchErrorOrNoSamples() to get a default value if an error occurs in the supplied argument, or if there are no data samples present.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/catcherrorornosamples\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":10021,"parent":3650,"menu_order":30,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,416,417,418],"class_list":["post-10010","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-catch","tag-error","tag-nosamples","Version-4-0","Version-4-6-5","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10010","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=10010"}],"version-history":[{"count":3,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10010\/revisions"}],"predecessor-version":[{"id":64827,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10010\/revisions\/64827"}],"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\/10021"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=10010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=10010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=10010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}