Currently building out a search where a user can search via Languages Spoken (all good), Skills (all good), and by a Timezone ID (ie; Europe/London or America/New York for example).
The issue is with the Timezone ID search which hangs on page load, and leaves an empty field for at least 2 minutes before any data appears in it…
When it does load you can see it is only showing the Timezone IDs which are currently attached to a user. Which is probably a good thing so you don’t have a dropdown with 200 Timezone IDs in it…
These are the settings I have in the Editor…
Are these correct? What would be causing the hang? Is there a much better method to use?
I think the issue is there’s just so many Timezone IDs… it’s going to take a while to populate.
What’s the search & replace doing? (And is the dropdown population faster when you remove that? (Note that what’s going on here is the search for Timezone IDs must complete and then the search/replace is iterating over all of those.)
What you might need to do is build a list of available Timezones in a not real-time manner. Eg, Run an API Workflow or manually trigger a bulk workflow that builds an object like “Timezone List”. So there’s only 1 and you could populate the dropdown via Search for Timezone List:first item’s Timezone ID Names (for example)
So Timezone List just has a list of texts on it (field Timezone ID Names) that you periodically update, rather than building this list dynamically in the page…
ACTUALLY: an even better idea… build this list just once. Then, when a new user signs up, if their TZid is not already in the list on the Timezone List object, add it right then
Thanks Keith. With the Timezone ID list (ie; Europe/London, America/New York etc…) do you mean add this in manually?
I do have it where when a user edits their profile and adds their location (ie; St Petersburg, Russia), their Timezone ID is then displayed on their profile when they click Save Updates.
Could I not get the timezone ID added to the User data type when this is done so there is a permanent record, and you’re not calling upon Google each time? Surely this would help speed things up?
The question is how the hell would I do this?
YNo, I mean computationallly build the list. But don’t do it every time. Build a static copy, see?
Checking out my previous reply. How the heck would I achieve this?
Have tried a few different things with no luck
The same way you dynamically construct the list in the dropdown… except:
You will save that constructed list as a new data type and
Do it in a server side workflow (API Workflow)
The concept is you’re making a system variable or system constant. Maybe my explanation here will help?:
Yeah I do this all the time. Either add such data in the data tab or build a little admin interface for it.
Here’s a simple example. Let’s say you want an array of things for representing the Days of the Week.
Make a data type “Day of Week” give it fields for Name (a text), index (a number), and anything else u want to reference about those things. Now make 7 of them.
Boom. Now you have a system level object that is a list of Day of Weeks. To access it, Do a search for Day of Weeks. This wil…
@keith Erm. Ok. Still struggling a little. Could you show me an example/preview however small?
If you want a list of current time zones - you can store the Zone ID and Name when you save the user.
Name (Eastern Standard Time etc) might be easier ? Rather than Id.
Then just pull a list of unique elements as text.
Pinging the geo lookup for every address on the database … is not going to be the best way
I do this in Teamytime to make it faster.
But… Like I said to
@marc2 in previous message: Save THAT in the database so you don’t have to do even THAT that search over and over.
@marc2: Make a new data type. Call it “Timezone Dropdown Source” or whatever you like. Give it at least 1 field. Call it “Text” (type text and it is a list).
Now do Nigel’s search. Create a new Timezone Dropdown Source and set its Text to the results of Nigel’s search.
Now never do that again.
When new users sign up, push their Timezone ID onto that Text field. Bubble will remove dupes so u don’t even need logic.
This object can be referred to as:
Do a search for Timezone Dropdown Source:first item’s Text.
See? System constant. Very fast to retrieve. There’s only one of them. Never create another.
This topic was automatically closed after 70 days. New replies are no longer allowed.