Help with the new dynamic DisplayForm
Hello. I'm trying to set up a displayform that will do the following:
1 - Get employee names and departments from an external SQL Server database.
2 - Set up a displayform that has a combo box with unique departments from the SQL Server table
3 - When the user selects a department, a second combo box gets populated with all employees from that department.
I'm struggling with populating the combo boxes. First, how do I populate the department combo box? I've set up a SearchTable and can access its REST endpoint, but how do I use it to seed the combobox?
Second, how exactly do I populate the 2nd combo box? Is this a simple cascading query, or do I need to modify it at runtime somehow?
Thanks in advance for any help.
Chris
-
Howdy -
I'd also like to know how to populate a combo box based on the choice in a radio button group above in the form... I can see in theory how it works and how the unique form item is assigned a new value (based on reading the online help) but can't nut it out.. it says the
ComboBoxFormItem is not defined (same goes for other items in Combo Box that I'm referencing)
My Assign activity: form.Find(Of ComboBoxFormItem)("ComboBox2").Label.Text = "test"
ComboBoxFormItem
form.Find(Of ComboBoxFormItem)("<FormItemID>").Label.Text
form.Find(Of ComboBoxFormItem)("<FormItemID>").QueryServiceUrl
form.Find(Of ComboBoxFormItem)("<FormItemID>").QueryWhereClause
form.Find(Of ComboBoxFormItem)("<FormItemID>").Tokenis there any chance we could get some simple examples posted to the code gallery to get us started?? This is a big change to the way administrators can think about designing the true 'workflow' of events/activities presented to the user so I'm a little surprised there is little in the way of examples out there to consume...
cheers
Gareth
0 -
Hi Chris,
This isn't going to work the way you expect because the REST endpoint exposed by a Search Table is not a query service. If you look at the query endpoint of an ArcGIS layer or feature service it will have input parameters like a where clause and out fields. A Search Table endpoint only has the parameters you define in Manager. There are very different beasts even though their outputs are the same. You could probably "trick" the Search Table endpoint into looking like a query service if you changed its parameter to "where", but this is pretty weird and not something we'd recommend. I think your best bet would be to add tables to your MXD that expose the data you are after. These will offer proper query support.
Populating a second combo box would be handled by a cascading query.
The runtime modification support that was added in Essentials 3.9 is a server side concept. The modifications you make to the form are applied just before the form definition is sent to the client application. It does not provide any sort of client side event handling.
--Ryan
0 -
Thanks Ryan. I added the SQL tables to the mxd and got it working.
Chris
0 -
Gareth,
I agree some examples would have been nice. I ran into the same problem as you. It turns out you have to manually add the reference to the Geocortex Form Items in the designer. (I'm using the stand alone designer)
To fix the error go the "Imports" tab at the bottom and add "Geocortex.Forms.Client.Items"
0 -
Thanks Colin
I knew it had to be something simple-ish (if you know what to look for) like that! I'll give it a crack....
cheers
Gareth
0
Please sign in to leave a comment.
Comments
5 comments