Hoppa till huvudinnehållet

Issue passing an object from a form's combo box as a GPString to a GP service

Kommentarer

2 kommentarer

  • Stefan Schweigert

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

     

    Thank you for the input. I tried implementing your suggestion by putting the following VB expressions in the Geoprocessor activity:

     

    Geoprocess 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,

     

    Aaron 

     

     
    0

Du måste logga in om du vill lämna en kommentar.