Adding Items to ComboBox


Author
Message
Tim Dol
Tim Dol
StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I need to add some functionality similar to the new user-defined category that you added to the DDT. I also believe the same functionality exists in the permissions editor.  I added a new field to my table to store the category value.

What technique did you guys use to populate the category combobox with unique category values and drop the cateogry when it was no longer in use. Did you create another table to maintain these values? 

Thanks

TIm

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Actually, when we allow the user to manually type the category, we just fill the combo box by using

SELECT DISTINCT category FROM MyTable ORDER BY category

which just retrieves all of the values.  When all of the records using the category are removed or moved to another category, it just no longer appears in the list because it's no longer in the table and therefore doesn't get picked up by the query.

Tim Dol
Tim Dol
StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)StrataFrame User (412 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Will this be slow on large tables?
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
We haven't had it slow down perceptively.  If it ever does, you could certainly cache off the values in a Shared business object somewhere.  I'm sure you might be able to find something on Google about the performance of a SELECT DISTINCT.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I think the key would be to have an index on the category (or whatever column your doing the select distinct on). Otherwise, there will be temp tables and table scans and it gets ugly fast.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search