{"id":21236,"date":"2024-01-22T10:12:03","date_gmt":"2024-01-22T09:12:03","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/functions\/"},"modified":"2026-05-13T09:35:25","modified_gmt":"2026-05-13T07:35:25","slug":"functions","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/functions\/","title":{"rendered":"Functions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n<p>It is possible to use most of the functions available in pure Javascript. Please note that the features of web-based Javascript are not available.<\/p>\n\n<h1 class=\"wp-block-heading\" id=\"Lesfonctions-Fonctionspr&#xE9;-int&#xE9;gr&#xE9;es\">Pre-integrated functions<\/h1>\n\n<p>In order to facilitate your experience with Open Bee\u2122 Scan Capture , a few functions have been pre-built and can be used regardless of the context of the script.<\/p>\n\n<p>When a function uses an index ID as a parameter, you can find the one corresponding to the desired index in the configuration interface of this index by clicking on the information button<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/273356272.png\" alt=\"\"\/><\/figure>\n\n<p>All of the examples below have been created for an index script on the following document:<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/273356274.png\" alt=\"\"\/><\/figure>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/273356273.png\" alt=\"\"\/><\/figure>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getIndexesFromID(infos,pid)\">getIndexesFromID(info, pid)<\/h3>\n\n<p>This method is used to get the Info objects contained within the <em>\n  <u>info<\/u>\n<\/em>list with id <em>p<\/em><em>\n  <u>id<\/u>\n<\/em><\/p>\n\n<pre class=\"wp-block-code\"><code>var listHT = getIndexesFromID(pParameters, \"AMOUNT_EX_VAT_INDEX\");\nreturn JSON.stringify(listHT);<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>&#91;\n\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"total\",\"text\":\"total\",\"rectangle\":{\"x1\":1318,\"y1\":1495,\"x2\":1399,\"y2\":1524}},\"value\":{\"textPropositionByCapture\":\"322.28\",\"sourceValue\":\"322.28\",\"text\":\"322,28\",\"rectangle\":{\"x1\":2302,\"y1\":1341,\"x2\":2418,\"y2\":1373}},\"lockValue\":false,\"idUnit\":1,\"id\":\"AMOUNT_EX_VAT_INDEX\",\"name\":\"Total HT\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"total\",\"text\":\"total\",\"rectangle\":{\"x1\":1318,\"y1\":1495,\"x2\":1399,\"y2\":1524}},\"value\":{\"textPropositionByCapture\":\"425.29\",\"sourceValue\":\"425,29\",\"text\":\"425,29\",\"rectangle\":{\"x1\":2301,\"y1\":1297,\"x2\":2420,\"y2\":1330}},\"lockValue\":false,\"idUnit\":2,\"id\":\"AMOUNT_EX_VAT_INDEX\",\"name\":\"Total HT\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"total\",\"text\":\"total\",\"rectangle\":{\"x1\":1318,\"y1\":1495,\"x2\":1399,\"y2\":1524}},\"value\":{\"textPropositionByCapture\":\"103.01\",\"sourceValue\":\"103,01\",\"text\":\"103,01\",\"rectangle\":{\"x1\":2303,\"y1\":1497,\"x2\":2413,\"y2\":1530}},\"lockValue\":false,\"idUnit\":3,\"id\":\"AMOUNT_EX_VAT_INDEX\",\"name\":\"Total HT\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}\n]<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getFirstIndexFromID(infos,pid)\">getFirstIndexFromID(info, pid)<\/h3>\n\n<p>This method gets the first Info object in the <em>\n  <u>Info<\/u>\n<\/em>list with id <em>p<\/em><em>\n  <u>id<\/u>\n<\/em><\/p>\n\n<pre class=\"wp-block-code\"><code>var mtHT = getFirstIndexFromID(pParameters, \"AMOUNT_EX_VAT_INDEX\");\nreturn JSON.stringify(mtHT );<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"total\",\"text\":\"total\",\"rectangle\":{\"x1\":1318,\"y1\":1495,\"x2\":1399,\"y2\":1524}},\"value\":{\"textPropositionByCapture\":\"322.28\",\"sourceValue\":\"322.28\",\"text\":\"322,28\",\"rectangle\":{\"x1\":2302,\"y1\":1341,\"x2\":2418,\"y2\":1373}},\"lockValue\":false,\"idUnit\":1,\"id\":\"AMOUNT_EX_VAT_INDEX\",\"name\":\"Total HT\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getTextFromIndexInfo(info)\"><strong>getTextFromIndexInfo(info)<\/strong><\/h3>\n\n<p><strong> <\/strong>This method is used to obtain the text value of the Info object passed as a parameter<\/p>\n\n<pre class=\"wp-block-code\"><code>var mtHTInfo = getFirstIndexFromID(pParameters, \"AMOUNT_EX_VAT_INDEX\");\nvar mtHTText = getTextFromIndexInfo(mtHTInfo);\nreturn mtHTText;<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>322,28<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getArticleLines(infos,idLigne)\"> <strong>getArticleLines(info, lineid)<\/strong><\/h3>\n\n<p><strong> <\/strong>This method allows you to obtain the different item lines corresponding to a lineid id<\/p>\n\n<pre class=\"wp-block-code\"><code>var lignesInfos = getArticleLines(pParameters, \"ARTICLES_INDEX\");\nreturn JSON.stringify(lignesInfos);<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>&#91;\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"R\u00e9gularisation\",\"sourceValue\":\"R\u00e9gularisation\",\"text\":\"R\u00e9gularisation\",\"rectangle\":{\"x1\":1160,\"y1\":1295,\"x2\":1399,\"y2\":1332}},\"lockValue\":false,\"idUnit\":1,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"425.29\",\"sourceValue\":\"425,29\",\"text\":\"425,29\",\"rectangle\":{\"x1\":2301,\"y1\":1297,\"x2\":2420,\"y2\":1330}},\"lockValue\":false,\"idUnit\":1,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":1,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t},\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Remise\",\"sourceValue\":\"Remise\",\"text\":\"Remise\",\"rectangle\":{\"x1\":1160,\"y1\":1340,\"x2\":1284,\"y2\":1369}},\"lockValue\":false,\"idUnit\":2,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"322.28\",\"sourceValue\":\"322.28\",\"text\":\"322,28\",\"rectangle\":{\"x1\":2302,\"y1\":1341,\"x2\":2418,\"y2\":1373}},\"lockValue\":false,\"idUnit\":2,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":2,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t},\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Total exon\u00e9r\u00e9\",\"sourceValue\":\"Total exon\u00e9r\u00e9\",\"text\":\"Total exon\u00e9r\u00e9\",\"rectangle\":{\"x1\":1157,\"y1\":1390,\"x2\":1389,\"y2\":1419}},\"lockValue\":false,\"idUnit\":3,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"103.01\",\"sourceValue\":\"103,01\",\"text\":\"103,01\",\"rectangle\":{\"x1\":2304,\"y1\":1391,\"x2\":2413,\"y2\":1423}},\"lockValue\":false,\"idUnit\":3,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":3,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t}\n]<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getArticleLine(infos,IDLigne,idUnit)\"> <strong>getArticleLine(info, IDLigne, idUnit)<\/strong><\/h3>\n\n<p><strong> <\/strong>This method is used to get the item line corresponding to a lineid and the IdUnit id unit<\/p>\n\n<pre class=\"wp-block-code\"><code>var ligneInfos = getArticleLine(pParameters, \"ARTICLES_INDEX\", 2);\nreturn JSON.stringify(ligneInfos);<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>{\n\t\"indexInfos\":&#91;\n\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Remise\",\"sourceValue\":\"Remise\",\"text\":\"Remise\",\"rectangle\":{\"x1\":1160,\"y1\":1340,\"x2\":1284,\"y2\":1369}},\"lockValue\":false,\"idUnit\":2,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"322.28\",\"sourceValue\":\"322.28\",\"text\":\"322,28\",\"rectangle\":{\"x1\":2302,\"y1\":1341,\"x2\":2418,\"y2\":1373}},\"lockValue\":false,\"idUnit\":2,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"}\n\t],\n\t\"lockValue\":false,\n\t\"idUnit\":2,\n\t\"id\":\"ARTICLES_INDEX\",\n\t\"name\":\"Articles\",\n\t\"numPage\":1,\n\t\"docIndexType\":5,\n\t\"type\":\"ArticleLineInfo\"\n}<\/code><\/pre>\n\n<p><strong>getIndexFromArticleLine(infoLine, idIndex)<\/strong><\/p>\n\n<p><strong> <\/strong>This method retrieves the Info object corresponding to the idIndex id from an InfoLine item line<\/p>\n\n<pre class=\"wp-block-code\"><code>var ligneInfos = getArticleLine(pParameters, \"ARTICLES_INDEX\", 2);\nvar detectionInfo = getIndexFromArticleLine(ligneInfos, \"DESCRIPTION_ARTICLES_INDEX\");\nreturn JSON.stringify(detectionInfo);<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Remise\",\"sourceValue\":\"Remise\",\"text\":\"Remise\",\"rectangle\":{\"x1\":1160,\"y1\":1340,\"x2\":1284,\"y2\":1369}},\"lockValue\":false,\"idUnit\":2,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"}<\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Special Item Line<\/h2>\n\n<p>The methods below this box can only be used for a scripted index that belongs to an article row. To perform these examples, a scripted index has been added to the article line<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/273356275.png\" alt=\"\"\/><\/figure>\n\n<p><strong>getCurrentArticleLines(info)<\/strong><\/p>\n\n<p>  This method is a shortcut to the getArticleLines() method with the parameter:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Info: the list of invoice details<\/li>\n\n\n\n<li>id: is based on the global variable GROUPED_INDEX_ID<br\/><\/li>\n<\/ul>\n\n<pre class=\"wp-block-code\"><code>var lignesInfos = getCurrentArticleLines(pParameters);\nreturn JSON.stringify(lignesInfos );<\/code><\/pre>\n\n<p><strong>Result<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>&#91;\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"R\u00e9gularisation\",\"sourceValue\":\"R\u00e9gularisation\",\"text\":\"R\u00e9gularisation\",\"rectangle\":{\"x1\":1160,\"y1\":1295,\"x2\":1399,\"y2\":1332}},\"lockValue\":false,\"idUnit\":1,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"425.29\",\"sourceValue\":\"425,29\",\"text\":\"425,29\",\"rectangle\":{\"x1\":2301,\"y1\":1297,\"x2\":2420,\"y2\":1330}},\"lockValue\":false,\"idUnit\":1,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t\t\t{\"source\":2,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"&#91;null,null,null]\",\"sourceValue\":\"\",\"text\":\"&#91;null,null,null]\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"lockValue\":false,\"idUnit\":1,\"id\":\"TEST_SCRIPT_ARTICLES_INDEX\",\"name\":\"Test script\",\"numPage\":-1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":1,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t},\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Remise\",\"sourceValue\":\"Remise\",\"text\":\"Remise\",\"rectangle\":{\"x1\":1160,\"y1\":1340,\"x2\":1284,\"y2\":1369}},\"lockValue\":false,\"idUnit\":2,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"322.28\",\"sourceValue\":\"322.28\",\"text\":\"322,28\",\"rectangle\":{\"x1\":2302,\"y1\":1341,\"x2\":2418,\"y2\":1373}},\"lockValue\":false,\"idUnit\":2,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t\t\t{\"source\":2,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"&#91;null,null,null]\",\"sourceValue\":\"\",\"text\":\"&#91;null,null,null]\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"lockValue\":false,\"idUnit\":2,\"id\":\"TEST_SCRIPT_ARTICLES_INDEX\",\"name\":\"Test script\",\"numPage\":-1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":2,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t},\n\t{\n\t\t\"indexInfos\":&#91;\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"Total exon\u00e9r\u00e9\",\"sourceValue\":\"Total exon\u00e9r\u00e9\",\"text\":\"Total exon\u00e9r\u00e9\",\"rectangle\":{\"x1\":1157,\"y1\":1390,\"x2\":1389,\"y2\":1419}},\"lockValue\":false,\"idUnit\":3,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"103.01\",\"sourceValue\":\"103,01\",\"text\":\"103,01\",\"rectangle\":{\"x1\":2304,\"y1\":1391,\"x2\":2413,\"y2\":1423}},\"lockValue\":false,\"idUnit\":3,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t\t\t{\"source\":2,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"&#91;null,null,null]\",\"sourceValue\":\"\",\"text\":\"&#91;null,null,null]\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"lockValue\":false,\"idUnit\":3,\"id\":\"TEST_SCRIPT_ARTICLES_INDEX\",\"name\":\"Test script\",\"numPage\":-1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"}\n\t\t],\n\t\t\"lockValue\":false,\n\t\t\"idUnit\":3,\n\t\t\"id\":\"ARTICLES_INDEX\",\n\t\t\"name\":\"Articles\",\n\t\t\"numPage\":1,\n\t\t\"docIndexType\":5,\n\t\t\"type\":\"ArticleLineInfo\"\n\t}\n]<\/code><\/pre>\n\n<p>This method is useful when using multiple item line templates within the same document. It allows you to quickly reach information from your parent line without confusing it with information from other item line templates<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"Lesfonctions-getCurrentArticleLine(infos)\"><strong>getCurrentArticleLine(info)<\/strong><\/h3>\n\n<p>This method is a shortcut to the getArticleLine() method with the following parameter:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Info: The list of information on the invoice.<\/li>\n\n\n\n<li>id: is based on the GROUPED_INDEX_ID variables  <\/li>\n\n\n\n<li>idUnit is based on the global variable ID_UNIT<br\/><\/li>\n<\/ul>\n\n<pre class=\"wp-block-code\"><code>var ligneInfos = getCurrentArticleLine(pParameters);\nreturn JSON.stringify(ligneInfos );<\/code><\/pre>\n\n<p><strong>Result of the 1st article line<\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>{\n\t\"indexInfos\":&#91;\n\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"R\u00e9gularisation\",\"sourceValue\":\"R\u00e9gularisation\",\"text\":\"R\u00e9gularisation\",\"rectangle\":{\"x1\":1160,\"y1\":1295,\"x2\":1399,\"y2\":1332}},\"lockValue\":false,\"idUnit\":1,\"id\":\"DESCRIPTION_ARTICLES_INDEX\",\"name\":\"Description\",\"numPage\":1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"},\n\t\t{\"source\":0,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"425.29\",\"sourceValue\":\"425,29\",\"text\":\"425,29\",\"rectangle\":{\"x1\":2301,\"y1\":1297,\"x2\":2420,\"y2\":1330}},\"lockValue\":false,\"idUnit\":1,\"id\":\"MONTANT_ARTICLES_INDEX\",\"name\":\"Montant\",\"numPage\":1,\"docIndexType\":2,\"type\":\"DecimalIndexInfo\"},\n\t\t{\"source\":2,\"marker\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"value\":{\"textPropositionByCapture\":\"\",\"sourceValue\":\"\",\"text\":\"\",\"rectangle\":{\"x1\":0,\"y1\":0,\"x2\":0,\"y2\":0}},\"lockValue\":false,\"idUnit\":1,\"id\":\"TEST_SCRIPT_ARTICLES_INDEX\",\"name\":\"Test script\",\"numPage\":-1,\"docIndexType\":1,\"type\":\"VarcharIndexInfo\"}\n\t],\n\t\"lockValue\":false,\n\t\"idUnit\":1,\n\t\"id\":\"ARTICLES_INDEX\",\n\t\"name\":\"Articles\",\n\t\"numPage\":1,\n\t\"docIndexType\":5,\n\t\"type\":\"ArticleLineInfo\"\n}\n<\/code><\/pre>\n\n<h1 class=\"wp-block-heading\">Special Consistency Index<\/h1>\n\n<h3 class=\"wp-block-heading\">getConsistencyAllDatas(indexCoherence)<\/h3>\n\n<p>This method is used to retrieve data reported by the data retrieval script from a consistency index.<\/p>\n\n<pre class=\"wp-block-code\"><code>var indexCoherence = getFirstIndexFromID(pParameters, \"COHERENCE_INDEX\");\nvar data = getConsistencyAllDatas(indexCoherence));<\/code><\/pre>\n\n<h4 class=\"wp-block-heading\">Example of a result<\/h4>\n\n<pre class=\"wp-block-code\"><code>&#91;\n\t{\"CODE_ITEM\" : \"#253\", \"NAME\" : \"HDD 2To\", \"DATE\" : \"24\/07\/2023\" },\n\t{\"CODE_ITEM\" : \"#254\", \"NAME\" : \"HDD 1To\", \"DATE\" : \"01\/08\/2023\" }\n]<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">getConsistencyHeaders(indexCoherence)<\/h3>\n\n<p>This method is used to retrieve the data headers reported by the data retrieval script from a consistency index.<\/p>\n\n<pre class=\"wp-block-code\"><code>var indexCoherence = getFirstIndexFromID(pParameters, \"COHERENCE_INDEX\");\nvar headers = getConsistencyHeaders(indexCoherence));<\/code><\/pre>\n\n<h4 class=\"wp-block-heading\">Example of a result<\/h4>\n\n<pre class=\"wp-block-code\"><code>&#91;\n\t{\"title\" : \"Code\", \"id\" : \"CODE_ITEM\", \"type\" : \"String\", \"availableValues\" : &#91;\"#253\", \"#254\", \"#255\"] },\n\t{\"title\" : \"Nom\", \"id\" : \"NAME\", \"type\" : \"String\" },\n\t{\"title\" : \"Date de creation\", \"id\" : \"DATE\", \"type\" : \"Date\" }\n]<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">getConsistencyColumnDatas(indexCoherence, columnID))<\/h3>\n\n<p>This method retrieves all values in a column of data reported by the data retrieval script from a consistency index.<\/p>\n\n<pre class=\"wp-block-code\"><code>var indexCoherence = getFirstIndexFromID(pParameters, \"COHERENCE_INDEX\");\nvar data = getConsistencyColumnDatas(indexCoherence, \"CODE_ITEM\"));<\/code><\/pre>\n\n<h4 class=\"wp-block-heading\">Example of a result<\/h4>\n\n<pre class=\"wp-block-code\"><code>&#91; \"#253\", \"#254\" ]<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">getConsistencyDataLineIDUnit(indexCoherence, lineNumber)<\/h3>\n\n<p>This method retrieves all of the items in a row of data reported by the data retrieval script from a consistency index (first item = 1).<\/p>\n\n<pre class=\"wp-block-code\"><code>var indexCoherence = getFirstIndexFromID(pParameters, \"COHERENCE_INDEX\");\nvar data = getConsistencyDataLineIDUnit(indexCoherence, 1));<\/code><\/pre>\n\n<h4 class=\"wp-block-heading\">Example of a result<\/h4>\n\n<pre class=\"wp-block-code\"><code>{\"CODE_ITEM\" : \"#253\", \"NAME\" : \"HDD 2To\", \"DATE\" : \"24\/07\/2023\" }<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">getConsistencyDataIDUnit(indexCoherence, lineNumber, columnID)<\/h3>\n\n<p>This method is used to retrieve specific data from the data retrieval script from a consistency index based on its row number and column identifier.<\/p>\n\n<pre class=\"wp-block-code\"><code>var indexCoherence = getFirstIndexFromID(pParameters, \"COHERENCE_INDEX\");\nvar data = getConsistencyDataLineIDUnit(indexCoherence, 1, \"CODE_ITEM\"));<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Example of a result<\/h3>\n\n<pre class=\"wp-block-code\"><code>\"#253\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction It is possible to use most of the functions available in pure Javascript. Please note that the features of web-based Javascript are not available. Pre-integrated functions In order to facilitate your experience with Open Bee\u2122 Scan Capture , a few functions have been pre-built and can be used regardless of the context of the [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"parent":21211,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"templates\/ob-help-products.php","meta":{"footnotes":""},"class_list":["post-21236","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=21236"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21236\/revisions"}],"predecessor-version":[{"id":21237,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21236\/revisions\/21237"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21211"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=21236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}