I’ve been looking through the docs and can find a lot on how to append, replace etc. parameters to a URL, but nothing on how to get, and then use as strings/booleans, URL parameters. For example, I want to check the value of a certain parameter, whether it’s empty or not and to see what the value is.
That’s very useful, but that’s not what I was looking for, and it seems I didn’t specify what I wanted properly- I’m working with a webview, and want to extract parameters from that URL. Sorry for the confusion.
Thanks for the help everyone! However, none of these suggestions worked - I was looking to get parameters from a specified page URL, and found the solution after SCOURING the AppGyver docs. Where appVars.Webview is my app variable storing the current Webview URL on event change, and “0” indicates the first parameter in the aforementioned URL, here is the solution:
Hi! I don’t actually know what parameters the event gets, as I haven’t used it myself. Try and see by using ENCODE_JSON in a toast/alert/debug log and print out what you get from the output of the event. But the other replies suggest that the event may not provide the parameters you might need, so you might want to look into the other suggestions / solutions as well
Would this be the way to forward to a new page if the home page of the web app is launched from an url and the url has a param? For example, users can share a link to their story which includes the storyId as an url param. like this: [Preformatted text](https://platform.preview.appgyver.com/368325/wikacy-reels/page.Page5?storyId=-M9fHLAuAHww7sqKyiEr)
The storyId is a document in firebase. I want to check to see if app has been opened with a storyId and, if so, forward them to the story page where the data variable is set to pull the single record. I am trying to figure the best way to do this in appgyver. Any help would be sincerely appreciated.
ok, so I tried using an if statement as the first function in the on page mounted event to check to see whether the page param is empty, and if, so, continue with the rest of the logic, but if not, alert the value of the param. it worked to alert. however, when i tried to open page function and pass the param and dismiss initial view or without dismissing initial view, the app freezes, or just dismisses the initial view but does not open the desired page, instead just opening the next page in the stack. is this a bug??? do we know of any way to redirect to a desired page if someone shares a link to say, a story or something they want to share, which is what makes websites and apps useful???
edit: of course i made sure the desired page was set to allow open without auth. i have both top and bottom app nav disabled.
thank you. i think i am getting closer now. but in my case i do not know what the value of the param will be, only the key. i also would like to impliment different keys and the ability to check which key is being used to direct to different pages. such as if a user shares a story or their profile or a video post. I also see you use replace page instead of open page. i will try that.