select existing values in listbox
I have a listbox with Extended selection mode. It is being populated based on values in a domain.
I would like to take values that are already in the database and have them preselected (highlighted) in the listbox, along with the unselected values so that the user can change what's in the database.
I can't get what I have found in the forums to work. I'm hoping someone has a sample workflow, so I can see what I'm missing.
Thanks,
Mike
0
-
Carmen,
Thank you for the reply and sample.
I am trying to dynamically create the list from existing values in a database. The string that I get from the attribute field looks like this: Wells, Trees, Rocks,
I am having problems getting these items into a list that I can then use in the Runtime Modifications, as you have shown. The more I try, the confused I'm getting. I think I'm making this more difficult than it needs to be. Are there any samples that show the process of getting the values from the attribute field into the necessary list?
Thanks again. I really appreciate the help.
Mike0 -
I posted a sample workflow (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_DETAIL&dc=Geocortex_Essentials_cg&criteria=BESTANSWERS&id=kA460000000blj3) to the code gallery last month. It generates values for a display form list box based on attribute values from a field in one of your map layers.
It doesn't include a method to preselect values, but I imagine you could get there using the form.Find(Of ListBoxFormItem)("ListBox1").SelectedValues runtime modification. You could probably also load additional values into your list that didn't come from your attribute field.0 -
hi, I just found out that assign default value to listbox didn't show in the workflow simulator, but it actually does work in both viewers. 0 -
This thread really helped, but I want to really thank Jack Zhang's answer. His answer saved me a lot of unnecessary troubleshooting. What he says is very true, the listbox programmatic selection will not show up in the simulator, but does work in the viewer. 0 -
Hi Carmen,
Your workflow just resolved an issue I've been working on for a few hours... thank you for posting!!
Greg0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare