Skip to main content

select existing values in listbox

Comments

5 comments

  • Permanently deleted user
    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.

     

    Mike
    0
  • John Nerge
    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
  • Permanently deleted user
    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
  • Permanently deleted user
    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
  • Permanently deleted user
    Hi Carmen,

     

    Your workflow just resolved an issue I've been working on for a few hours... thank you for posting!!

     

    Greg
    0

Please sign in to leave a comment.