Skip to main content
September 10, 2021
Question

An error occurred while executing a save: Expression evaluation error: The save target must be a local variable that does not refresh on every evaluation or on an interval, a process variable, or a node input

  • September 10, 2021
  • 21 replies
  • 0 views

title as above,

code as:

a!save(target:ri!userinputsheet.KONE_user_name,value:fv!item.KONE_user_name),
                a!save(target:ri!userinputsheet.FIRST_NAME,value:fv!item.FIRST_NAME),
                a!save(target:ri!userinputsheet.LAST_NAME,value:fv!item.LAST_NAME),
                a!save(target:ri!userinputsheet.Email,value:fv!item.Email),
                a!save(target:ri!userinputsheet.Role,value:fv!item.Role),
                a!save(target:ri!userinputsheet.Branch,value:fv!item.Branch),
                a!save(target:ri!userinputsheet.Region,value:fv!item.Region),
                a!save(target:ri!userinputsheet.Manager_role,value:fv!item.Manager_role),
                a!save(target:ri!userinputsheet.Telephone_number,value:fv!item.Telephone_number),
                a!save(target:ri!userinputsheet.CE_LEVEL,value:fv!item.CE_LEVEL),
                a!save(target:ri!userinputsheet.Active,value:fv!item.Active),
                a!save(target:ri!userinputsheet.Language,value:fv!item.Language),
                a!save(target:ri!userinputsheet.Exceptional_case_library_view_right,value:fv!item.Exceptional_case_library_view_right),
                a!save(target:ri!userinputsheet.updateTime,value:now()),
                a!writeToMultipleDataStoreEntities(
                  valuesToStore: {
                    a!entityData(entity: cons!KONE_Development_userinputsheet_Constant, data: ri!userinputsheet),
                    a!entityData(entity: cons!KONE_Development_userrole_Constant, data: ri!userrole)
                  }
                )

what is the problem?

    21 replies

    gabriele.camilli
    September 10, 2021

    Hi,

    The problem may be that the write to datastore is not on the correct component

    Is this saveinto into a button or similar component?

    docs.appian.com/.../Write_to_Data_Store_Entity_Smart_Service.html

    Also if it's not necessary, i would advise to not save directly from the interface but to use a process model

    September 10, 2021

    saveinto button

    gabriele.camilli
    September 10, 2021

    could you share the whole button code?

    ravir0002
    September 13, 2021

    Can you try to comment the Write to Data store entity code and try, if is works, it means there is something wrong with DSE. So we can check there.

    September 13, 2021

    still report

    ravir0002
    September 13, 2021

    a!save(
    target: ri!userinputsheet.Language,
    value: if(
    isnull(ri!userinputsheet.Language),
    "Chinese",
    ri!userinputsheet.Language
    )
    ),

    Try above code on save into for language.