Can a variable be part of Where Clause in a User Form?
Hi all,
I have a variable called userid as type of Int in Workflow Designer.
A combo box is on a Form that should list all PRODUCTs that have USER_ID equal to userid obtained from a previous Assign activity.
However, I am not sure how to construct the Where Clause on Form Designer. Can Where Clause contain custom variable as argument?
ComboBox Label: Products
Task URL: http://arcgisserver/ArcGIS/rest/services/GC/MapServer/0
Where Clause: USER_ID = userid ??????
Thanks, Alex
-
Hi Alex,
I have some good news for you. As of Essentials 3.9, you can use the new Runtime Modifications to do exactly what you described.
The way you would accomplish this is by leaving the where clause empty in the designer, then add an Assign activity to the runtime modifications section of the Display Form activity. In the Assign activity, set the "To" to form.Find(Of ComboBoxFormItem)("ComboBox1").QueryWhereClause and the "Value" to "USER_ID = " + userid
You'll need to include Geocortex.Forms.Client.Items in the Imports section of the designer. You'll also need to make sure the id in the find is the one for your ComboBox. I used ComboBox1 as an example.
Also, if the userid variable is not a string, you'll need to use .ToString(). If the variable USER_ID in your map service is of type string, you'll need single quotes in your where clause. So something like "USER_ID = '" + userid.ToString() + "'".
Hope this helps,
Christian.
0 -
Hi Christian,
Thanks so much for your help and clarification on the new feature of 3.9.
This is really what I wanted!
Cheers,
Alex
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer