ForAll(
colPriRankRevOrderModded,
Patch(
'DataSource',
LookUp(
'DataSource',
ID = Value(ThisRecord.ID)
),
{
PriorityRank: ThisRecord.PriorityRank,
Status: {Value: ThisRecord.Status.Value},
'Due Date': ThisRecord.'Due Date',
Description: ThisRecord.Description,
Cynefin: {Value: ThisRecord.Cynefin.Value},
Priority: {Value: ThisRecord.Priority.Value},
Expectation: ThisRecord.Expectation
}
)
);
Patch(
'DataSource',
LookUp(
'DataSource',
ID = Value(ThisRecord.ID)
Patch(
'SEAL - Salesforce - Priority Queue',
LookUp(
'SEAL - Salesforce - Priority Queue',
ID = Value(IDNew)
),
ClearCollect(
colPriRankOrig,
With(
{
wList: Sort(
Filter(
'SEAL - Salesforce - Priority Queue',
Status.Value <> "Completed" && Status.Value <> "Cancelled"
),
'Priority Rank',
SortOrder.Ascending
)
},
ForAll(
Sequence(CountRows(wList)),
Patch(
Index(
wList,
Value
),
{RowNo: Value}
)
)
)
);
ClearCollect(
colPriRankRevOrder,
Sort(
colPriRankOrig,
RowNo,
SortOrder.Descending
)
);
ClearCollect(
colPriRankRevOrderModded,
ForAll(
colPriRankRevOrder,
{
PriorityRank: 10 * RowNo,
RowNo: RowNo,
ID: ID
}
)
);
ForAll(
colPriRankRevOrderModded,
Patch(
'SEAL - Salesforce - Priority Queue',
LookUp(
'SEAL - Salesforce - Priority Queue',
ID = Value(ThisRecord.ID)
),
{
PriorityRank: ThisRecord.PriorityRank
}
)
);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.