Server Connect With URL Params In Content Page Load

I have a content page that has a server connect on it, it takes url params lets say A and B something like mysite.com/test/A/B now I have an issue with how the server connect loads for example if I have it set to auto run it will run twice once before the params are noticed and once after meaning the first call is always an error (also runs again on leaving page causing another bad call).

Before the new app connect updates I could solve this issue using a page flow on auto run to initiate the server connect without an auto load but now this will only run the server connect once as expected but its doing it without params so its always a bad call until I refresh the page.

Is there a better way to do this in short im wanting a server connect on a content page to only run once on page load with the url params noticed and to not load again when the params are changed to navigate to another page like mysite.com/members/A/B

You can put the server connect in a conditional region that only opens up once certain conditions are met. It will then run the auto run server connect.

2 Likes

Nice idea this actually works for the page load aspect so there is no bad call at the start due to the params not yet been noticed however it still causes a bad call when switching pages at least if the condition is just something on the lines of checking if the url params are null. But if I add a page flow in the condition instead of a server connect it’s looking like this might be working thanks for the advice.

For others who read this I essentially have a condition that checks all the url params to see if they are not null, then inside the condition I have a page flow set to auto load which runs my server connect get request.

1 Like