{"id":21246,"date":"2022-04-11T13:56:06","date_gmt":"2022-04-11T11:56:06","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/objects\/jse_result\/"},"modified":"2026-05-13T09:36:47","modified_gmt":"2026-05-13T07:36:47","slug":"jse_result","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/objects\/jse_result\/","title":{"rendered":"JSE_Result"},"content":{"rendered":"\n<p>JSE_Result is a special type, because it is an object that must be built inside the script. It is used to return the result of an index and a list of values that can be used in that index as a drop-down list. Icon<\/p>\n\n<p>When running a script, it is possible to return a value directly. In reality, this value is directly encapsulated in a JSE_Result object.<\/p>\n\n<h1 class=\"wp-block-heading\" id=\"JSE_Result-Structure\">Structure<\/h1>\n\n<ul class=\"wp-block-list\">\n<li><strong>calculatedValue<\/strong>: The value returned as the index value as a string<\/li>\n\n\n\n<li><strong>values<\/strong> : The values that will be loaded into the drop-down list. As a string list<\/li>\n<\/ul>\n\n<pre class=\"wp-block-code\"><code>{  \n   calculatedValue: \"Toto\",\n   values: &#91; \"Toto\", \"Titi\" , \"Tata\"]\n}<\/code><\/pre>\n\n<h1 class=\"wp-block-heading\" id=\"JSE_Result-Construction\">Construction<\/h1>\n\n<p>In order to facilitate the use of this object, several builders have been set up  <\/p>\n\n<pre class=\"wp-block-code\"><code>var resultat = new JSE_Result();\nresultat.calculatedValue = \"Toto\";\nresultat.values = &#91; \"Toto\", \"Titi\" , \"Tata\"];\n\n\/\/ \u00e9quivalent \u00e0 \nvar resultat = new JSE_Result(\"Toto\");\nresultat.values = &#91; \"Toto\", \"Titi\" , \"Tata\"];\n\n\/\/ ne pas oublier de retourner l'objet \u00e0 la fin du script\nreturn resultat;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>JSE_Result is a special type, because it is an object that must be built inside the script. It is used to return the result of an index and a list of values that can be used in that index as a drop-down list. Icon When running a script, it is possible to return a value [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":21242,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"templates\/ob-help-products.php","meta":{"footnotes":""},"class_list":["post-21246","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21246","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=21246"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21246\/revisions"}],"predecessor-version":[{"id":21247,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21246\/revisions\/21247"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21242"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=21246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}