Hoppa till huvudinnehållet

I am trying to submit a form to create a new table record, the issue i have run into is if the user does not supply a value for a numeric value it error when I use the CreateFeature Tool. How can I get around an undefined value in the form?

Kommentarer

1 kommentar

  • Permanently deleted user

    Hi Thomas,

     

    Am I correct in that you're using the Number form element? I think the issue is in trying to access value.numeric from the number picker when value doesn't exist in the first place.

     

    There's two ways I see to approach this. Either:

    • We don't want the user to be able to submit the form without supplying that number value. Then we would solve the issue using validation in the form (eg, the "Required" checkbox from the right hand pane when the Number form element is selected)
    • We do want the user to be able to submit the form and generate a feature when they don't supply that number value. Then you could handle that by using an If activity after the form to determine whether they supplied a number, and act conditionally based on that.

    For the second approach, I'm attaching a quick example of a way to check/handle this.

    0

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