Aller au contenu principal

Get OBJECTID from Workflow Input

Commentaires

5 commentaires

  • Nico Burgerhart

    I think you can get it this way

    =$getWorkflowInputs1.inputs.context[0].OBJECTID

    0
  • Marius Kreß

    Thanks for your reply Nico Burgerhart, but this didn't work. The result is always undefined (if I use it in a log activity) or an empty window (if I use it in a Alert activity).

    I tried doing it via a JSON, and this worked. This is the workflow I used: 

    As the input for “Convert to JSON” I used =$getWorkflowInputs1.inputs.context[0] and as input for “Log” I used =$parseJson1.result.attributes.ID (in the layer I use for testing the ID is just ID, not OBJECTID).

    So you'd think that =$getWorkflowInputs1.inputs.context[0].ID or maybe =$getWorkflowInputs1.inputs.context[0].attributes.ID should give the same result, but it doesn't. This is what my Console looks like when I do it via JSON first and then via these two expressions: 

     

    Sidenote:

    If I understand this comment correctly, this behaviour

    has to do with the difference between a 'VSW feature' and a 'generic Esri feature'.

    But if there is a distinction like that, IMHO there should be a “Convert object to feature” activity or something similar instead of the weird JSON workaround.

    0
  • Yannik Bäder

    Hi Marius,

    did you check my request: https://support.vertigis.com/hc/en-us/community/posts/17935576533266-Not-able-to-retrieve-feature-attributes 

    You could try to add a “Run Operation” with “result.to-graphic” as Operation Name.

     

    0
  • Nico Burgerhart

    I would make same remark as Yannik, the operation name is result.to-graphics

    https://developers.vertigisstudio.com/docs/web/api-commands-operations/#operation-results.to-graphics

    If you need an example, I've to search for it.

     

    0
  • Marius Kreß

    Hi Yannik (and Nico),

    thanks for your replies. I used “Run Operation” combined with “Get Feature Attribute Value”:

    This got my desired result. So thanks for your help!

     

    But there is one thing that still puzzles me. In a comment in the linked thread, Yannik Bäder said:

    =$getWorkflowInputs1.inputs.context[0].attributes["OBJECTID"]? If I log this, I receive the correct number.

    If I log this (changing OBJECTID to ID), I get undefined. Is this because Yannik is using VertiGIS Studio Mobile, but I'm using Web?

    0

Vous devez vous connecter pour laisser un commentaire.