Task is loading old info instead of with up to date details from DB. How to load Task details with latest data from DB.

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

Parents
  • +1
    Certified Lead Developer
    Would need to know more details about where ri!NSARequest is coming from. Is it coming from a pv? If so, can you query for the value in a load() prior to your with()? That way, you can use the refreshed data from the DB on your form. You can pass ri!id (which is pv!NSARequest.id) instead of passing in all of NSARequest.

    load(
    local!NSARequest: rule!APP_getNSARequest(
    id: ri!id
    ).data,
    with(
    ... (replace ri!NSARequest with local!NSARequest)
    )
    )
  • Yes, ri!nsarequest is coming from PV. Applied above suggestion, but please advise how to save local!nsarequest into ri!nsarequest. In process model, after applying above suggestion, we are only passing NSARequestId, and retreiving into load variable. But there is no button to save load variable value into ri!NSARequest variable which is empty and need a value to pass on back to the process model scope. load variable in interface when passed onto process model upon button click is not being saved into DB for some reason...

    Please advise.
Reply
  • Yes, ri!nsarequest is coming from PV. Applied above suggestion, but please advise how to save local!nsarequest into ri!nsarequest. In process model, after applying above suggestion, we are only passing NSARequestId, and retreiving into load variable. But there is no button to save load variable value into ri!NSARequest variable which is empty and need a value to pass on back to the process model scope. load variable in interface when passed onto process model upon button click is not being saved into DB for some reason...

    Please advise.
Children