I’ve made a 1 page mobile app (I have an Index page and all of the other “pages” are Groups that I hide and show).
It consists of many “things” of a single type (like Posts, if you will), that others can comment on.
My goal, which I’m having trouble with, is to pass a page parameter (of a Post) into an email, so that when someone clicks the email link, it will load the Index page, detect if that page parameter is there, and open the corresponding View of that “thing” accordingly - explained with an example below…
So Person A creates a post, and then let’s say that Person B comments on it. I’m then triggering an email notification to Person A (via a SendInBlue template) that Person B commented on it. I want to make it so that the email that Person A receives includes a link with that “thing”/Post in it, so that when he opens it, it opens the app and then opens that specific “thing”. More specifically, my intention is for it to open the Index page (which is my only page), and then have a Workflow on pageload that if the URL contains a parameter with one of those “things”, it should trigger the Group (that displays the View of that type of “thing”), and pass that "thing"s parameter to the Group to open it (so that he doesn’t have to go searching for it to see the comment).
I believe I have it all working, except for 1 part that I can’t figure out (mentioned above), which is how to pass that “thing” as a parameter INTO the email link that I’m sending out. I know that parameters can be passed when transitioning pages, but I can’t figure out how to pass a URL parameter into an email.
Are you using the built in, send email function or are you using an external service?
I’m passing the Thing’s unique ID into a parameter for the email, it looks like this: ?job=%JID%
The url to the app is put in front of that.
Then there is an input on the page that has get parameter ‘job’ from url and a workflow that triggers a group to show and load the thing that has that unique ID. (do search for things where ID= get parameter’s ID.
So, not sure what you exactly can’t get to work, but you should have access to the post that was created by Person A and put the ID of that thing in the url parameter.
Otehrwise, maybe share some screenshots or better, your editor.
For formatting, keep in mind is that parameters are case sensitive. Ie. “insight” (lowercase i) is different than “Insight” (capitalized I).
As well, if your values in your parameters have anything odd in their structure, that may throw things off. (This StackOverflow thread gives some good pointers). It’s best to take a look at your debugger how the URLs are captured.
What happens is that it loads the Index and then this part disappears from the URL:
?insight=1529289570164x782763756848939000
It becomes this:
domain/version-test/index/sample:custom.insight
So then I tried removing the “Only when” and opening the URL again - this time, it opens the Insight “View” Group, but with no content (since the id disappeared from the URL, I’m guessing it doesn’t have that information anymore and had nothing to load).
Any ideas why it might be getting rid of the id when the page loads?
Is there a reason you have “insight” in your URL twice? While I don’t think that Bubble would confuse them, it may be a cause for error. (And prevents you from properly using the “this URL contains” function.
The second issue I see is that after the debug_mode=true parameter, you have a “?”
When constructing parameters, you signify the first parameter with a “?”, then any subsequent parameters with a “&”. Try fixing that first.
Regardless, if you have a navigation event (or refresh), you will likely lose the original parameters unless you specify them to be carried over.