Changing a dropdown on page load to match page query

Hey all…

I have a list companies that from an Airtable collection > LIST
And I am generating reports for each on a static page > /r/?cID=company-name
Company’s are referred by a Company ID parameter (cID) and I am using them as query for the page URL to load the relevant company. (at least in theory - but because page is not loading what i want, this is a problem)

I have a big dropdown on the report page, which acts as the company title on the report page. This is a design choice to encourage people to explore other companies…

My problem is; on page load, I am not able to update the dropdown to take the cID and assign it as the selected object for the dropdown.

Changing that dropdown works fine manually… But I want to load a default value for it on page load.

Any ideas? Or other suggestions to establish this logic?

Hi @yunus

Have you tried binding the initial value of the select?

I’m thinking that might do the trick but not 100% sure :slight_smile:

I did, but it doesn’t seem to work.
Not sure why but still tinkering all combinations, none worked so far…

Just trying the local storage setting for cID parameter… will let you know.

1 Like

Mmm ok. Is there anything confidential in your app? If not, a short video of what you tried would be great! Might help us find the right approach for this use case

I found my issue, there was a lookupArray that i forgot to trigger, fixed it now. but thanks.
also sent you the project links… you can see it in action. Currently fixed… links working, page loading as intended. Thanks :slight_smile:

1 Like

Wonderful! Nicely done :grinning: