Array property indexing and update

I have an array from selectable editable grid . Now i want to update value in the array under a particular property and then save that to the db. For saving to the database I am using writeToDataStoreEntity but i need to update some text and then submit for database save. Here is record from a selected row in the grid.

[acctType:(Investment-IRA) Prevailing Rate ,ppiStatus:Open,modifiedDate:4/11/2018 7:59 PM GMT+00:00,modifiedBy:steve.busser,createdDate:4/11/2018 7:59 PM GMT+00:00,createdBy:steve.busser,deadline:4/18/2018 12:00 AM GMT+00:00,ticketNumber:31,ppId:78]

I am trying to change ppiStatus to "Void", modifiedBy currentuser so on and so forth for the remaining fields.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • The way i have it is: a!save(local!Rowdata,
    index(local!ticketInfo.data,wherecontains(
    local!gridSelection.selected,
    local!ticketInfo.identifiers
    ),{}
    )
    )


    So local!Rowdata has only the selected records from the editable. Now I want to go to each record and set the status field to void. I was hoping to find the index of the value that i get by doing: index(local!rowdata,"ppiStatus"} and then somehow use updatearray to replace the status value with "void". Then submit local!Rowdata using WrtToDS. Hoping my approach is correct.
Reply
  • The way i have it is: a!save(local!Rowdata,
    index(local!ticketInfo.data,wherecontains(
    local!gridSelection.selected,
    local!ticketInfo.identifiers
    ),{}
    )
    )


    So local!Rowdata has only the selected records from the editable. Now I want to go to each record and set the status field to void. I was hoping to find the index of the value that i get by doing: index(local!rowdata,"ppiStatus"} and then somehow use updatearray to replace the status value with "void". Then submit local!Rowdata using WrtToDS. Hoping my approach is correct.
Children