Back button using Custom Vars as Strings + URL parameters

Hi all, hi @J805 ,

I have been using a custom variable to track my views (and subviews) like this:

view_history=“view1, view2, viewX” etc
subview_history=“subview1, subview2, subviewX” etc

When a user navigates (I use Custom Workflows I call “Go To ABC” etc) I append the newest view and subview to their respective history list custom variables. Then when the user clicks the back button (triggering “Go Back” workflow) I remove the last item from each list after setting the view and subview to these last-in-list items. All was working fine. Until…

Then I realised that I needed to add some items in URL parameters. So at the end of each navigation I have added a Go To Page similar to the one below. I have tried with “replace in browser history” on as well as off.

The thing is that now instead of logging the new navigation in each list it adds multiple items (in some cases it adds 2 items, in others 3). It is the correct item and just repeated. But I don’t understand how this is happening

So for example instead of “view1, view2” I am getting “view1, view2, view2”. So when the user clicks back it in effect only removes one item from the list but they see no change until the click it again.

This is the log navigation workflow:


Front end can be seen here and shows Values of main Custom variables in the pink section https://app.wandrguides.com/version-test/venue-test-url-parameters/1613475656537x165516245328929400

Navigating to an INDIVIDUAL tour/tag/event or InfoPoint (exhibit) will trigger the specific behaviour I am refencing (use the 3 bar menu top right) to access these.

I hope that makes sense, and that someone has some idea of what might be causing this or how it could be fixed. Any help much appreciated.

Thanks,
David

Hey David @2020travelapp! :wave:

Have you tried doing a step-by-step like this to see where things are going wrong? That is normally how I figure out at what point things are starting to go wrong and why.

Also, what is the ultimate goal of doing this? Do you just want a back button to work? Or is there some other motive in doing this? There might be an easier way to achieve what you are trying to do.

Let me know. :blush:

ok, this was really stupid of me - and I should of course have looked at the step-by-step - but there was a Log Navigation workflow on the Page Load workflow, which I just needed to add a condition to so it only ran on first page load and now it all seems to be working. Will do some more testing but that seems to have fixed the issue.

Obvious when you know how! Thanks @J805 :slight_smile:
Have a nice weekend,
David

1 Like

Awesome! :clap: Glad that worked out. I knew you would be able to figure it out. :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials

This topic was automatically closed after 70 days. New replies are no longer allowed.