Combobox + Multiple Queries
Hi,
I'm stuck.
What I'd like to do is give the user the option to choose between three methods of searching (ID Number, Name, Unique ID)
I'd like the user to select their search option from a drop down, then be prompted to enter the value based on the selected search option, which would then select the output and zoom to it.
All of these would be strings. I have set up a combo box design form, and I've tried using IF statements and FlowSwitches, but I can't figure out how to get the user "search option" to trigger the next event (Query).
Can anyone help me with this?
Thanks
-
Lauren,
If I'm reading this correctly - I do a similar thing with a couple of my workflows... I present a checkbox/listbox (either way they returns a string), and I then check for the option chosen in a Switch activity..
ie. template_chosen.ToString is the Expression to use in the switch - with template_chosen being the output result (string) from the combo box value list as you would have set up manually... (or imported)
from the switch activity - simply join up to the relevant query task flows using the values from the template_chosen....
hope that helps..
I can attach an example if that helps
regards
Gareth
0 -
Hi Gareth,
The output for the first display form is an object though... when I create the Switch I create it as an object and put in the expression "cbtype.ToString", but when I connect it to the three different cases I'm prompted to enter something under "Add new case". Anytime I try to enter anything it says, "Case Key value cannot be converted from/to type string".If you could provide some examples, perhaps I could get a better understanding!
Thanks,
I'm more of a GIS person than a programmer, this is all very new to me!0 -
I also can't find the option to "check option for chosen in switch activity"
0 -
Lauren
attached to the link below is an example. Check the first combo box and what it returns, and how it's handled in the switch event. Just ignore the first decision check, but it is relevant for the workflow, not so much the switch..
(https://support.geocortex.com/Data/Sites/1/userfiles/2797/test.xaml) /Data/Sites/1/userfiles/2797/test.xaml
hope it helps
cheers
Gareth
PS. for non-programmers the workflow can be a little daunting, as I'm not a 'real deal' .NET/Java programmer either, but stick at it and things start to make more sense after a while. It's not simple by any means but the forums, and people's help (LG included), go a long way in helping you to get a better grip of it. Although we often reach the limit of pure workflow activities and call for external help - ie. programmers to write the custom modules we have running.....
0 -
Thanks Gareth!
It's definitely a learning experience!0
Please sign in to leave a comment.
Comments
5 comments