Updating variables working in editor but not the deployed version

Hi everyone!

I’m experiencing a very strange problem that I’m hoping for guidance on.

Apologies in advance for what will be a lenghty overview. Given I don’t know where the error may be, I’ve cast the net wide but please prompt me for more info if needed.

  • The user navigates from the ‘do-guide’ page to the ‘do’ page by clicking a button
  • There is a workflow for ‘do’ onload where 2 variables holding the index of an array are set to 0, and then those variables are used to get the first (0) item in 2 different other arrays. The 2 index variables, 2 variables that are created from the result, and the arrays that are used to look up the result are all saved in local storage
  • When the user navigates from the ‘do-guide’ to the ‘do’ page by clicking the button, the result variables are loaded correctly
  • When the user is on the ‘do’ page and refreshes, the result variables are loaded correctly (suggesting to me that the local storage is working correctly)
  • When the user goes from the ‘do-guide’ page to the ‘do’ page (by clicking the button), but then goes back to the ‘do-guide’ page (by changing the url in the browser) and then clicking the button to go back to the ‘do’ page, the result variables are loaded as nulls

This is only happening on the deployed version. On the the editor the variables reset correctly.

Also note that when I replace the result variable formula with a hardcoded value, the results are set correctly on the deployed version. The error seems to be caused by the formula populating my result, but I’m confused as to why the formula wouldn’t work given it’s simplicity, the fact that it’s being saved in local storage and the fact that it’s working in the editor…

For reference, this is one of the formulas that is leading to one of the null value:

image

And when I look in local storage in the inspector, the fw_Categories array remains loaded across all of the above navigation points, as do the other source/result variables.

Thanks in advance!

Hi @ilan :wave:

I would suggest checking that the default value of your variables is 0 and that you are not preserving the variable on navigation, but I’m not sure I understand your use case.

Would you mind recording a short video walking us through the process?

Thanks for the quick reply @Joyce.

I have actually found a way around this problem by converting the group of pages to a single-page application (which I was going to do regardless). Happy to talk through my use case and the issue I was experiencing in more detail as it did feel ‘buggy’, but appreciate this was more likely due to user error…

1 Like

Ah ok, awesome that you found a solution!

If you have time to record a short video to explain, I’d be more than happy to share it with the tech team so they can investigate but, of course, no pressure if you don’t have time :slight_smile:

Thanks Joyce, have sent you a DM

1 Like