Scenario: Task as shown in below form is loading with incorrect values. Asset already submitted to ITS review and still shows as pending in upper grid, whereas in the lower grid in below image, the details are upto date and are refresing everytime when i change status of other team's update on that asset.
Please advise how to load with latest info. Have already set the below option on Tasks. Still not refreshing in this specific table.
The interface with grid is simple, that is called in parent interface. The code where it retrieves list of pending actions is below. The expression rule is working fine as expected but the task isn't loading with latest info. Using Inbuilt Task Mechanism, instead of storing Tasks/Processes info in DB, in order to store only business data in DB.
with( local!pendingActions: reject(fn!isnull, a!forEach( items: ri!NSARequest.SelectedApprovalTeams, expression: if(isnull(rule!NSA_GetStatusOfApprovalTeam_ExprRule(ri!NSARequest, fv!item)), fv!item, null) )) , a!gridLayout( label: "Submit the Asset for review to the below pathway team(s).", totalCount: count( local!pendingActions ), headerCells: { a!gridLayoutHeaderCell( label: "Action Pending" ), a!gridLayoutHeaderCell( label: "Action Status" ), a!gridLayoutHeaderCell( label: "Complete Action", showWhen: ri!enableTriggerImages ) }, columnConfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE", weight: 3 ), a!gridLayoutColumnConfig( width: "DISTRIBUTE", weight: 1 ), a!gridLayoutColumnConfig( width: "NARROW", showWhen: ri!enableTriggerImages ) }, rows: a!forEach( items: local!pendingActions, expression: { a!gridRowLayout(
Discussion posts and replies are publicly visible
Please see the below code where load variable is saved in DB in button, this is not saving into DB. How to fix it? a!buttonWidget( label: "SAVE", confirmMessage: "Please confirm if the task is complete.", confirmHeader: "Please Confirm", confirmButtonLabel: "Confirm", cancelButtonLabel: "cancel", value: local!nsaRequest, saveInto: { a!save(local!nsaRequest,save!value), a!writeToDataStoreEntity(dataStoreEntity: cons!NSARequest_Entity_Cons, valueToStore: local!nsaRequest, onSuccess: "", onError: "") }, submit: true, style: "PRIMARY" )
If i pass the NSARequest from process model with rule input into interface and save the same rule input that works, but not load variable. But, i need to use load variable to load latest data in task always.
Can you try the below code, a!buttonWidget( label: "SAVE", confirmMessage: "Please confirm if the task is complete.", confirmHeader: "Please Confirm", confirmButtonLabel: "Confirm", cancelButtonLabel: "cancel", value: "SAVE", saveInto: { a!save(ri!nsaRequest,local!nsaRequest), a!writeToDataStoreEntity(dataStoreEntity: cons!NSARequest_Entity_Cons, valueToStore: ri!nsaRequest, onSuccess: "", onError: "") }, submit: true, style: "PRIMARY" )
Instead of trying to write the load variable, save that load variable into ri first and then write the ri to DB. Thanks, Hema
Tried the above, didn't save into DB. The error thrown on screen is below. The load variable definitely has value, because it is being used to show values in the task interface in which we are trying to save details with save button. The above code discussed is inside a Task Interface.
Please try the below code for a!writeToDataStoreEntity() a!writeToDataStoreEntity( dataStoreEntity: cons!NSARequest_Entity_Cons, valueToStore: ri!nsaRequest, onSuccess: a!save( local!result, "Done" ), onError: a!save( local!result, "Error" ) )
Also, please refer to the documentation, https://docs.appian.com/suite/help/18.4/Write_to_Data_Store_Entity_Smart_Service.html Thanks, Hema