Initial Operations resets even after saving

Hi! I have uploaded the model and want it to display first 6 months of simulated data when the end users log in. I am using Operation: stepTo in the initial operations and setting it to 6. however the setting resets as soon as I change view or refresh and I cannot see the results in the end user graphs as well.


This is the screenshot of the changes I want to make.

Please advice on how to resolve this issue

Hi–

We looked into it. I think this may be a bug in the settings page for interface builder. However you can set this by editing the flow js in the index page.

See directions on data-f-on-init here:
https://forio.com/epicenter/docs/public/data_binding_flow_js/generated/dom/attributes/events/init-event-attr/

Include stepTo(6) in the body tag as follows. (Keep all the other attributes currently in the tag in place of the … )

<body data-f-on-init="stepTo(6)" ... >

Best, WILL

Hey Bill,
Thanks for the quick reply!
I tried editing the index.html and got this error. I tried editing different files and was able to edit all of them except index.html. I tried relogging and used a different browser and session and still got the same error. I have emailed support regarding the same.

Hi Chiren,

It looks like the file is too big to edit in the Epicenter manager.

You can edit this file by downloading and uploading with a sftp program. Access the site by using port 9043, with your Epicenter username and password, using a sftp program (like winscp).

WILL

Thank you Will! I updated the index page by replacing the older index.html with a updated copy as sftp program gave an error. The code has no effect please advice on how to proceed further. Also introduction.html is overwritten every time I try to change init behavior.

I still cannot run the operation on init. Can someone advice on what could be wrong?

Hi –

Have you tried the page “index.html”? This is loaded when the sim loads. Unlike the introduction page, it is not overwritten by the interface builder.

Best regards, WILL

Hi –

We’ve corresponded separately about this but I wanted to share the solution in this form. The data-f-on-init attribute is not properly functioning – our team is looking into that.

In the meantime, you can call the operation via Javascript when the page loads.

Insert this Put this into introduction.html, just before the last

<script>
   $(document).ready(function() {
   Flow.channel.publish('operations:stepTo', 6);
   });
</script>

This will call the stepTo operation when the page is loaded. Use “stepTo”, not “step” as this will never step past 6.

A challenge when editing the pages directly is that they can be overwritten. You can work around this by putting it in the correct spot in the page. If you put it full before or after the outer div tag it will be overwritten, and if you put it inside a div row tag it may be overwritten. Instead, but it after the last row.

<div class="intro">
  <div class="row">  
    content
  </div>
  <div class="row">  
    content
  </div>

  <script>
     $(document).ready(function() {
     Flow.channel.publish('operations:stepTo', 6);
     });
  </script>
<div>