Skip to main content
June 25, 2023
Question

a!update shows error

  • June 25, 2023
  • 7 replies
  • 0 views

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:

    7 replies

    mathieud0001
    Brainy
    June 25, 2023

    You need to specify a target.

    [View:https://docs.appian.com/suite/help/23.2/fnc_evaluation_save.html]

    stefanhelzle0001
    Brainy
    June 26, 2023

    When not using a!save() inside a saveInto, you can only assign a target variable to which to save the value to.

    Your a!update statement also look odd. Do you mind describing what you want to achieve?

    uttrat238161
    June 26, 2023

    Hey, First you need to use a!save() to save the result into the correct target otherwise you'll get this error. And also the code seems a bit off to me specifically the data part of update function. For updating the status you can try using startProcess() or a related action and by passing the identifier you can update the record with correct status there only and it will be much simpler to configure and understand.

    davel001150
    June 26, 2023

    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.

    June 26, 2023

    thank you , will try it 

    June 26, 2023

    you can't directly do a!update in saveInto you should use a!save() and store the a!update in some variable

    Example:-a!save(ri!data,a!update(logic))

    June 26, 2023

    thanks