Displaying different group depending on a dropdown search

Hi everyone,

i’m facing an issue and i hope a good bubble-soul could help me.

I have on my project 2 pages, the first is the index page and the second the search page, who displays the result of the search.
I have on my search page 3 types of results for 3 types of ads / listings. Each type is in a group, displayed thanks to 3 text-buttons and to workflow options (for example : if i click button “ads #1” show group “ads#1” and hide group “ads #2” and hide “ads #3”, etc). Until then, I have no problem.

But, I would like to set a quick search into the index page thanks to a dropdown menu and a search button sending to the search page. I would like to have in this dropdown, as you guess, 3 options (ads #1, ads #2 and ads #3) and let’s say, if my user selects ads #2 in the dropdown and clicked search he directly goes on the search page with the group ads #2 displayed.

I tried to figure out a solution for hours now but i’m really stuck…

Thank you very much for your time and your help :slight_smile:
(sorry about possible spelling errors)

Hey @pierre.legendre :slight_smile: You can accomplish this using parameters. Can you share a link to your app editor set to public? Happy to help set this up and then explain how!

Hi @fayewatson,

thank you for your answer :slight_smile:
My app is in private mode and I don’t know how to put in public mode… if you can explain to me how to do it it would be very nice.

I also had a new problem who is very annoying :
I have two types of ads (three to be accurate but the third is not set for the moment). the pages are strictly the same, only the data displayed is different but for a reason that i don’t understand, the type A ads is displayed perfectly well and the second not at all.
One more thing, since yesterday sometimes my app don’t want to load in preview mode, it just freezes… is it possible to have too many workflows ? Maybe it can explain why a type of ads is not displayed any more…

thank you very much for your help !

No problem! :slight_smile:

To set the app to public, you would go to Settings (on the left side of the editor) --> General --> Application Rights (Everyone can edit). Then copy+paste the URL of the app editor and paste it here, that will allow me to temporarily view the editor.

In regards to the app not loading in preview mode, I’m not sure what that could be! I haven’t had that happen, but perhaps there is a reoccurring workflow that is causing an issue (just a guess)? I’ll definitely take a look!

Thank you so much for taking time to help me out !

so this is the URL of the app editor :

You will notice there’re 63 issues but this is normal, they concern a third listing type. This third listing type is not set up yet because i try to figure out what’s the problem with the second listing type.

Thanks a lot for your support :slight_smile:

My pleasure! :slight_smile:

Before starting on sending parameters from the first page to the search page, I would recommend looking at some of the tutorials in the forum on custom states to adjust when groups are visible. Custom states can be a bit tricky at first, but will make things much easier when building your app to show and hide groups. For example, now the app shows and hides groups using many “show” and “hide” workflow actions. This isn’t wrong, but can be more time-consuming and harder to manage. With custom states, you set up conditional statements on different groups, and then set them to be visible based upon the value of the custom state. It’s tricky without seeing it, but here’s a really useful demo/video by @dan1:

In that example, the conditional statement changes the background color of different bulbs based on the value of the custom state. In your app, the process would be similar, but you would create conditional statements which adjust the visibility of groups using “This element is visible” [checked or unchecked]. Here is a written example:

I don’t mean to overwhelm you, but this will definitely make things easier to do sooner rather than later when your app is almost complete! Definitely give it a try and if you get stuck at all, feel free to let me know if you have any questions. :slight_smile: