Assign a direct url to a pop up

Hi bubblers,

I have a Library page using Pop up that display info of my database. I would like to be able to open that popup through a specific URL. Like :

I am using the get url function when my page is load

and display the data link to the URL.

but obviously, i am missing something or do not use a correct url because it’s not working.

As anyone done that before ?
Thank you in advance for your help !

It looks like you’re passing the data incorrectly to the URL.

The url “reader” needs to know what it’s looking for, so the field name should be there. Right now, it’s only seeing a string of text.

The correct format for referencing something in the URL should be “?field_name = field_value

The url should read “…?material_ID=1234567890”, rather than "…?1234567890"

Hope that helps.

Edit: You can see a great example of this if you view your app in debug mode. You’ll see "

“debug_mode” is the field, “true” is the value.

1 Like

Thank you for your help, but I don’t understand why I cant make it work with any other field except unique id…

Hi @lise.nicolas :slight_smile: The workflow looks correct from the screenshot. Is the popup’s type of content text? If so, what is the setup for displaying a Material within the popup? Can you share a link to the editor?

the workflow is working but only with unique id :

I don’t know understand why I can’t make it work with an other parameter…

Pop up type is a specific DataType…
When I display pop up I send : parent group datatype to the popup

Sadly, no I can’t make my app public.
It’s not a big issue, because I am making it work with material unique ID but more of a personal understanding of why it’s not working when it should…

@lise.nicolas Ohh, got it! So you’d like to be able to use something like “material = silver” in the URL instead of material = [silver unique ID]?

If each name is unique, you could still send the name as the parameter (of type text, instead of of type Material), but the display data action would need to use a search first (with the parameter as a constraint) in order to display the correct Material thing associated with the URL. For example, if the parameter in the URL sent was “material=silver”, and a Material with the name of silver existed in the database, the workflow would be:

Display Data in Popup Display Material
Data to Display: Do a Search for Materials, (constraint, Name = Get Material from Page URL): first item.

The reason unique id will work immediately (doesn’t require a search) is because the unique ID tells Bubble exactly which Material you’d like to display, similar to how data is sent when a page’s type of content is not empty. If you need to display shorter and cleaner links, you can still use another field in the parameter, but it would be best if each Material had a unique text value to ensure that the correct Material is being displayed in the popup each time.

For example, if you had two types of Silver Material Things in your app, you could add a field to the Material Data Type (such as ‘Parameter Value’ (type: text, list: no). The Parameter Value would be similar to a ‘unique ID’ but it would be more of a unique name. One silver thing could have the Parameter Value field of “silver1” and the next could be “silver2” (similar to a unique username for each Material). Then in the Display Data search it would look like:

Display Data in Popup Display Material
Data to Display (Do a Search for Materials (constraint, Parameter Value = Get Material from page URL): first item. *Making sure the Material parameter was of type text, and matches a Material with that Parameter Value field’s value. That should work but let me know if not! :slight_smile:

Oh Thank you for your help ! I did exactly that but what I was missing was the :first item.
I do have a ID nb for each material which is unique to each material. :slight_smile:
it does make sense to put it !

1 Like

Ah! Awesome!! :slight_smile: No problem at all!

1 Like

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