a!update shows error

Certified Associate Developer

I have a grid with data from the record type, I should have a link a column to either withdraw or cancel. when a user clicks its. The status in the record type has to be updated .UI below

when I am trying to update the record type it shows error. Please help

error:

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The update function takes an input of some kind of data and outputs the same with one index in the data changed.  a!update( data: {1,2,3,4}, index: 2, value: 7) returns {1,7,3,4}.  But you don't put it anywhere.  In reality you're just doing this:

    saveInto: {

    {1,7,3,4}

    }

    What does that even mean?  It's just hanging out in space, and Appian isn't told to use it for anything so it just throws it away.  Really, it gives exactly the error message you've gotten.  If you do save function, save( local!myVariable, a!update( data: local!myVariable ....)) , now you're putting {1,7,3,4} somewhere, specifically you're putting it into local!myVariable.

Reply
  • 0
    Certified Lead Developer

    The update function takes an input of some kind of data and outputs the same with one index in the data changed.  a!update( data: {1,2,3,4}, index: 2, value: 7) returns {1,7,3,4}.  But you don't put it anywhere.  In reality you're just doing this:

    saveInto: {

    {1,7,3,4}

    }

    What does that even mean?  It's just hanging out in space, and Appian isn't told to use it for anything so it just throws it away.  Really, it gives exactly the error message you've gotten.  If you do save function, save( local!myVariable, a!update( data: local!myVariable ....)) , now you're putting {1,7,3,4} somewhere, specifically you're putting it into local!myVariable.

Children