Issue passing an object from a form's combo box as a GPString to a GP service
I have created a workflow that has a form with a text box and a combo box. The argument results are then received as an object (the combo box) and a string (the text box). From there I use the Cast Activity to change those variables into GPStrings. My GP service never receives the values I send to it, and instead fires with the defaults set in the service.
As a test, I tried setting up an alert after the form where I have it display the values from my form. I can get the text box argument (which comes out as a string) to display, but even if I cast the combo box results as a string, I still can't get that value to show up in the alert.
I am missing something here. Any help would be appreciated.
Best,
Aaron
0
-
Hello Aaron,
On the Workflows Sample Site, we have an example usage of the Geoprocessor activity where one of the output arguments is an object containing a double. As an imput to the Geoprocessor activity, you can use the CType function like this: New GPDouble("Days", CType(numberOfDays, Double))
Let me know if this works.Thanks, Stefan
0 -
Stefan,
Thank you for the input. I tried implementing your suggestion by putting the following VB expressions in the Geoprocessor activity:
For Map Theme I used:
New GPString("Map_Theme",CType(MapTheme, Object)) --> This gave an error "Object Strict on Disallows implicit conversions from 'Object" to 'String'"
New GPString("Map_Theme",CType(MapThemeString, String)) --> The geoprocess activity takes this expression, but my default value is used (the one that is set in the GP service) instead of what is chosen in the Form Combo Box.
New GPString("Map_Theme","123457890") ---> The geoprocess activity works with the hardcoded value
My input for Taxlot is working. That is captured as a string in the form, and then I use this expression in the Geoprocessor Activity: New GPString("Taxlot_Number",TaxlotChoice). I am wondering if I have somehow designed my form incorrectly.
Best,
Aaron0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer