refresh an interface after a record action
i have a requirement in which once the user completed the record action"reconcile fields" for all the docs,a validation process will be running in the backend which is added to this record action process model as a start process...so once user completed all docs,this validation process will start ,at that time i need to disable the next button and once process got completed i need to enable it (currently a check is there for next button to enable once all the docs got reconciled)..i created a process report for the validation process and query the active ones and storing inside a local variable local!queryActiveSync but the issue it is not refreshing immediately ..once the user completes the reconcile fields action for all docs,the next button is disabled after some seconds..i need to disable it immediately once the user completes the reconcile fields action..(next button is in a wizard step)
local!queryActiveSync: a!refreshVariable(
value: rule!FIO_getActiveProcessValidationRunSync(orderid: ri!order['recordType!{ea70f4a6-f4e4-4843-8ab4-fcf7f88814fd}FIO Order.fields.{7060b131-cd3c-44c7-adeb-afd36faf893e}orderid']),
refreshInterval: 0.5,
refreshAfter: "RECORD_ACTION",
refreshOnVarChange:local!disbaleNextStepExtraction
),
a!wizardStep(
label: "Extractions",
contents: {
a!cardLayout(
contents: {
a!gridField_26r2(
label: "",
labelPosition: "ABOVE",
data: a!recordData(
recordType: 'recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance',
fields: rule!AIA_EXTRACTION_INSTANCE_FIELDS(),
filters: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: 'recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance.fields.{507e0674-64d1-4f82-9bed-13d283c9d410}documentId',
operator: "in",
value: {
index(local!fioDocuments, "appianDocId", {})
}
)
},
ignoreFiltersWithEmptyValues: true
)
),
columns: {a!gridColumn(
label: "",
value: a!recordActionField(
actions: {
a!match(
value: ri!type,
equals: cons!FIO_CONS_ORDER_DOCUMENT_REVIEWER_ROLES[1],
then: a!recordActionItem(
action: 'recordType!{a5902e78-cb02-40f8-8b12-7c421dc3051a}FIO Extraction Instance.actions.{04c69a6f-a9fb-4099-b3e0-36d2d07ad2bd}reconcileFieldMaker',
identifier: fv!row['recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance.fields.{7a1970b4-ae29-4d49-96d5-3659721cff16}id']
),
equals: cons!FIO_CONS_ORDER_DOCUMENT_REVIEWER_ROLES[2],
then: a!recordActionItem(
action: 'recordType!{a5902e78-cb02-40f8-8b12-7c421dc3051a}FIO Extraction Instance.actions.{3c57e081-70ec-4419-b77c-44e43e097d48}reconcileFieldChecker',
identifier: fv!row['recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance.fields.{7a1970b4-ae29-4d49-96d5-3659721cff16}id']
),
equals: cons!FIO_CONS_ORDER_DOCUMENT_REVIEWER_ROLES[3],
then: a!recordActionItem(
action: 'recordType!{a5902e78-cb02-40f8-8b12-7c421dc3051a}FIO Extraction Instance.actions.{4358718b-c574-4018-ade1-89c9a1d670e9}reconcileFieldSupervisor',
identifier: fv!row['recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance.fields.{7a1970b4-ae29-4d49-96d5-3659721cff16}id']
),
default: {}
)
}
),
sortField: 'recordType!{64322398-e457-4695-87d5-09794164cf77}AIA Extraction Instance.fields.{7a1970b4-ae29-4d49-96d5-3659721cff16}id',
align: "END"
),
validations: {},
spacing: "DENSE",
borderStyle: "LIGHT",
shadeAlternateRows: true,
refreshAlways: true(),
refreshAfter: "RECORD_ACTION",
userFilters: {},
showSearchBox: true,
refreshOnVarChange: local!refreshGrid,
showRefreshButton: true,
similarityScoreThreshold: 1.0
)
},
marginBelow: "STANDARD",
style: "NONE",
padding: "MORE",
shape: "SEMI_ROUNDED"
),
a!sectionLayout(
contents: {
a!richTextDisplayField(
value: a!richTextItem(
text: proper(ri!type) & " has updated the fields. Please wait while the validations are running in the background.",
color: "NEGATIVE",
style: "STRONG"
),
showWhen: local!queryActiveSync
)
}
),
},
disableNextButton: or(tointeger(local!queryActiveSync),not(local!disbaleNextStepExtraction)),
),
