{"id":45242,"date":"2020-02-03T13:13:39","date_gmt":"2020-02-03T05:13:39","guid":{"rendered":"https:\/\/oihelp.corporate.ifs.com\/help\/?page_id=45242"},"modified":"2024-07-05T12:39:01","modified_gmt":"2024-07-05T04:39:01","slug":"submitting-values-to-explorer","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/xla\/submitting-values-to-explorer\/","title":{"rendered":"Submitting Values to Explorer"},"content":{"rendered":"\n<p class=\"intro-text\">IFS OI Excel Add-in provides a macro function that you can use to submit entity values to IFS OI Explorer for storage. This is typically done by embedding a button in a worksheet.<\/p>\n<p class=\"intro-text\">The following example describes how to add a button to a worksheet and use the BFPut function to submit values to IFS OI Explorer when the button is clicked.<\/p>\n<p class=\"intro-text\">1. Open a blank workbook in Excel, with a default worksheet name of Sheet1.<\/p>\n<p class=\"intro-text\">2. Make sure the <strong>Developer <\/strong>tab is displayed in the ribbon toolbar (turned off by default):<\/p>\n<ol class=\"intro-text\" style=\"list-style-type: lower-alpha;\">\n<li>Click the <strong>File<\/strong> tab, and select <strong>Options<\/strong>.<\/li>\n<li>Click <strong>Customize Ribbon<\/strong>.<\/li>\n<li>In the list on the right, select the <strong>Developer<\/strong> check box.<\/li>\n<li>Click <strong>OK<\/strong>.<\/li>\n<\/ol>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"685\" class=\"wp-image-45326\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31.png 840w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31-768x626.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31-150x122.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31-600x489.png 600w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-31-48x39.png 48w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/p>\n<p class=\"intro-text\">3. Click the <strong>Developer <\/strong>tab on the ribbon.<\/p>\n<p class=\"intro-text\">4. Add a form button to the sheet:<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">a. On the Developer tab, click the Insert button and select the <strong>Button <\/strong>Form Control.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"266\" class=\"wp-image-45327\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-33.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-33.png 400w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-33-150x100.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-33-48x32.png 48w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">b. Drag a rectangular area on the sheet where you want the button.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">An <strong>Assign Macro<\/strong> window appears.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\">5. To add some new VB macro code (which executes when the command button is clicked), click <strong>New<\/strong> in the Assign Macro window.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">The Assign Macro window appears.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"370\" class=\"wp-image-45328\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-34.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-34.png 386w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-34-150x144.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-34-48x46.png 48w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/p>\n<p class=\"intro-text\">6. Type a name for the macro, click in the white box, and then click <strong>New<\/strong>.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"370\" class=\"wp-image-45329\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-35.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-35.png 386w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-35-150x144.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-35-48x46.png 48w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">Visual Basic opens.<\/p>\n<p class=\"intro-text\">7. Enter the following code:<\/p>\n<p><code>Sub MacroName()<br \/>\n    Application.Run \"BFPut\", Sheet1.Cells(1, 1), Sheet1.Cells(1, 2), Sheet1.Cells(1, 3)<br \/>\nEnd Sub<\/code><\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"982\" height=\"312\" class=\"wp-image-45330\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36.png 982w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36-768x244.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36-150x48.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36-600x191.png 600w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-36-48x15.png 48w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><\/p>\n<p class=\"intro-text\">8. Close the VB Macro Editor window.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\">You are returned to the Excel worksheet, and the button will now be labelled.<\/p>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"696\" class=\"wp-image-45331\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37.png 1072w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37-768x499.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37-150x97.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37-600x390.png 600w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-37-48x31.png 48w\" sizes=\"auto, (max-width: 1072px) 100vw, 1072px\" \/><\/p>\n<p class=\"intro-text\">9. Make sure that in your worksheet, you have entered the following cell data:<\/p>\n<ul class=\"intro-text\">\n<li class=\"intro-text\">Cell <strong>A1 <\/strong>should contain the tag name to put (for example, <strong>SILVER<\/strong>)<\/li>\n<li class=\"intro-text\">Cell <strong>B1 <\/strong>should contain the time stamp for the data (for example, <strong>2016-08-16T01:00:00<\/strong>)<\/li>\n<li class=\"intro-text\">Cell <strong>C1 <\/strong>should contain the value for the tag (for example, <strong>1000.1<\/strong>)<\/li>\n<\/ul>\n<p class=\"intro-text\">10. Rename the button to something more meaningful:<\/p>\n<ol class=\"intro-text\" style=\"list-style-type: lower-alpha;\">\n<li>Right-click on the button and select <strong>Edit Text<\/strong>.<\/li>\n<li>Type the new name for the button, for example Put Data.<\/li>\n<\/ol>\n<p class=\"intro-text\">11. Click the button to test the function. Any errors will appear in a message box.<\/p>\n<p class=\"intro-text\"><img loading=\"lazy\" decoding=\"async\" width=\"846\" height=\"437\" class=\"wp-image-45332\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38.png 846w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38-768x397.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38-150x77.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38-600x310.png 600w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-38-48x25.png 48w\" sizes=\"auto, (max-width: 846px) 100vw, 846px\" \/><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2 class=\"page-subheading\">BFPut<\/h2>\n<p class=\"intro-text\">Format: <strong>BFPut(EntityName, Time, Value)<\/strong><\/p>\n<p class=\"intro-text\">BFPut stores entity data within IFS OI Explorer.<\/p>\n<p class=\"intro-text\">For a given Entity Name, Time, and Value, this function can submit these values to IFS OI Explorer for storage. It is provided as a macro function within Excel\u00ae, to be used by a VBA programmer. For further details, refer to Submitting Values to IFS OI Explorer.<\/p>\n<p class=\"intro-text\"><strong>Entity Name<\/strong>: The specified Entity Name of the IFS OI Explorer entity that you want to save.<\/p>\n<p class=\"intro-text\"><strong>Time<\/strong>:\u00a0The date and time for which you want to save.<\/p>\n<p class=\"intro-text\">The ISO 8601format accepted in IFS OI Excel Add-in is <strong>YYYY-MM-DDThh:mm:ss<\/strong>. Where:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><span style=\"color: #008000;\">YYYY<\/span><\/p>\n<p><span style=\"color: #008000;\">MM<\/span><\/p>\n<p><span style=\"color: #008000;\">DD<\/span><\/p>\n<p><span style=\"color: #008000;\">hh<\/span><\/p>\n<p><span style=\"color: #008000;\">mm<\/span><\/p>\n<p><span style=\"color: #008000;\">ss<\/span><\/p>\n<\/td>\n<td>\n<p>Four-digit year<\/p>\n<p>Month (01 to 12)<\/p>\n<p>Two-digit day of month (01 through 31)<\/p>\n<p>Hour in 24 hour format (00 - 23)<\/p>\n<p>Minutes (00 to 59)<\/p>\n<p>Seconds (00 through 59)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\">If the time is specified in <strong>Excel format<\/strong>, then the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/xla\/array-formula-functions\/\">BFTimeFromExcelTime<\/a> function must be used to convert from Excel format to ISO8601 format. This is so that you can easily use Excel formulas to calculate a time, then convert that time for use with the IFS OI Explorer functions.<\/p>\n<p class=\"intro-text\"><strong>Value<\/strong>:\u00a0The Value parameter is the value you wish to store for the Entity Name and the Time you wish to save it for.<\/p>\n<p class=\"no-toc-heading\">Return Value<\/p>\n<p class=\"intro-text\">There is no return value.<\/p>\n<p>&nbsp;<\/p>\n<h3>Adding a VBA Reference<\/h3>\n<p class=\"intro-text\">Before you can use BFPut you must add a VBA reference to your current project.<\/p>\n<p class=\"intro-text\">To add a reference:<\/p>\n<ol class=\"intro-text\">\n<li>Select <strong>Tools&gt;References...<\/strong> from the VBA code window.<\/li>\n<li>Select <strong>BabelFishExcel2007Addin<\/strong>.<\/li>\n<\/ol>\n<p class=\"intro-text\" style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"371\" class=\"wp-image-45333\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-39.png\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-39.png 459w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-39-150x121.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2020\/02\/word-image-39-48x39.png 48w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/p>\n<h3>How to Call BFPUT<\/h3>\n<p class=\"intro-text\"><strong>Example 1<\/strong><\/p>\n<p class=\"intro-text\">Calling BFPut() from a VBA macro with hard coded parameters<\/p>\n<p><code>Application.Run \"BFPut\", \"TEST001.PV\", \"2002-10-01T03:00:00\", 5<\/code><\/p>\n<p class=\"intro-text\"><strong>Example 2<\/strong><\/p>\n<p class=\"intro-text\">Calling BFPut() from a VBA macro with cell referenced parameters<\/p>\n<p><code>Application.Run \"BFPut\", Sheet1.Cells(1, 1), Sheet1.Cells(1, 2), Sheet1.Cells(1, 3)<\/code><\/p>\n<p class=\"intro-text\"><strong>Example 3<\/strong><\/p>\n<p class=\"intro-text\">Calling BFPut() from a VBA macro with hard coded parameters<\/p>\n<p><code>Call BFPut(\"TEST001.PV\", \"2002-10-01T03:00:00\", 5)<\/code><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IFS OI Excel Add-in provides a macro function that you can use to submit entity values to IFS OI Explorer for storage. This is typically done by embedding a button in a worksheet. <\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/xla\/submitting-values-to-explorer\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":45282,"parent":45233,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[11],"tags":[859],"class_list":["post-45242","page","type-page","status-publish","has-post-thumbnail","hentry","category-tutorial","tag-excel","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/45242","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=45242"}],"version-history":[{"count":21,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/45242\/revisions"}],"predecessor-version":[{"id":67861,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/45242\/revisions\/67861"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/45233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/45282"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=45242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=45242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=45242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}