Clever way to pass parameters in a URL

Hi! :slight_smile: I have a question trying to send the ID of a listing as a URL parameter.

When a user creates a new listing to my marketplace (in my case, a “service_request” or request of a service to be done by a professional), he´s automatically redirected to the listing he´s just published. To build the listing, I store all the inputs entered by the user in a new service_request, use as ID of the service_request the unique_ID truncated to the last 8 digits (see pic 1 below) and send the user to that service_request page passing this truncated ID (as ids) and I also send other data (the result of the previous step, see pic 2 below), because otherwise it gives me an error (“Data to send” is marked in red).

My problem is that the URL to which he´s sent looks like this:
nameoftheweb.bubbleapps.io/version-test/service_request/1501426862867x755668764479979500?ids=79979500

So, I’m sending to service_request the following info: /unique_id?ids=ID. To me, it looks like I’m sending the same parameters twice… I´d like to send the ids just once, and that´s all (nothing about the unique_id). The problem is that in the service_request page I also display some info about the profile of the user that created the service_request, so in case I delete any of the parameters in the URL I have some errors in such destiny page.

I mean, I could live with many parameters in the URLs, but it feels like it can be done much easier and SEO-friendly… Actually, in my clone of Airbnb (made during the Code-Free course) I do it much simpler, but I cannot replicate that behaviour here.

Any advise?

Thanks a lot!

Choose one method. If you’re passing service_request data to the page via “Data to Send”, then you don’t need the URL parameters. Everywhere you do reference those URL IDs, just switch it to “Current Page’s Service_Request”.

For example, if the page is displaying the date the service_request was created and you’re currently retrieving that like this:

Search for Service_Request: first item’s created date, with constraint: Unique ID = Get ID from URL…

You can instead change it to: Current Page’s Service_Request’s Created Date and that’s it.

If you prefer to use the URL parameters only, then just remove the service_request type from the page settings in the property editor for the page. Then data to send won’t be required.

Using both methods (data to send & URL parameters) is good when the Thing in question is different because you can only send 1 type of thing via Data to Send but you can send anything via URL parameters. Right now, you’re sending the exact same Thing via both methods, so it’s not necessary to use both.

3 Likes

Wow @romanmg, THANKS a lot! I’ve understood the reason and after changing the current logic in my web, I’ve been able to fix it and now I only send the IDS in the URL for the listings and the ID for the users. Thank you once again for the detailed explanation! :slight_smile:

1 Like

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