Revisiting Setting Values for Dropdowns

I found a lot of relevant information on the thread below and modified the example in the forum app, linked below as well.

The objective is to add new title and select the title added in the dropdown, while avoiding duplication, such that if the title already exists, the workflow simply selects it in the dropdown without duplicating it.

The Add New Title workflow does a good job of avoiding duplication, selecting a title from the list if it already exists. It also adds a new title to the dropdown but does not automatically select the new title added. Any idea why?

I added a new button, Add New Title combo, with slightly more extended workflow, to handle truly new titles and existing titles that need not be duplicated distinctly. It solves the problem but I’m still curious to learn why the Add New Title workflow wasn’t enough, if anyone has ideas

The new title simply wasn’t being created by the time Step 2 of the workflow was being run. I removed the advanced filtering and put those constraints directly on the searches to speed it up and then slipped a half second pause between Step 1 and Step 2. You can try it now and see that it works.

That is why the initial workflow wasn’t working but the better way to structure the workflow is the way you have it set up on the Add New Title Combo button.

Just get away from using the advanced filtering on your searches :slight_smile: It’s going to kill the speed of your apps.

Thank you!!

1 Like

Wanted to circle back on this and get your thought … I used advanced filtering because, in reality, i am going to be doing case-insensitive search, to avoid duplication on account of case differences. Advanced filtering lets me compare say Title Name in lowercase with the lowercase version of the input stored in a hidden element.

I guess one alternative is to store the lowercase version of a Title Name in a separate field whenever a Title is created, and use that as the search field. What’s worse for app speed - advanced filtering or additional data in extra fields for search?

I’m not aware that using search constraints directly in the Do a search for is case sensitive. That hasn’t been my experience.

Yeah, looks like a drawback of Do a search. In the forum app example, I entered mongolia as a new Title Name and clicked the Add New Title combo button, with workflow tweaked to Do a search without Advanced filtering. You’ll notice Mongolia and mongolia are now both listed as Title Names

@chrismchewols, check out the forum app example again.

I changed the search from Name = Input’s value to Name contains Input’s value. That seems to catch any version of the word regardless of any capitalization.

i.e. Mongolia, mongolia, monGOlia, MongoLIA will all return Mongolia in the dropdown.

Fantastic!! Works perfectly. Thank you! :smiley:

1 Like

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