Assign the claim-grouped sort key¶
Computes the grouping key used to float claims with an urgent task to the top of the "my tasks" list.
| Field | Value |
|---|---|
| Operation ID | OP-7 |
| Trigger | Called from Add and from AfterRetrieve per row |
| Inputs | Task row, previous row's latched grouping state |
| Outputs | task.sortBy assigned |
| Primary components | clsMyTaskCollection.setSortOrder |
| Entry point | SAIF.Business.Tasks.Claim/clsMyTaskCollection.vb |
Steps¶
- When the row's
ClaimIDdiffers from the previous row's, latch a new grouping state: ifPriorityCode = "URG", set the "priority" flag and use theClaimIDitself as the group sort number; otherwise clear the flag. - Assign
task.sortBy= the latched claim ID for urgent groups, otherwise the constant100000000000000, so claims with an urgent task float to the top and all remaining tasks share one bucket ordered by date/claim (BR-MY-02).*
Process flow¶
flowchart TD
Start([setSortOrder called]) --> Check{"ClaimID differs from<br>previous?"}
Check -->|Yes| Latch{PriorityCode = URG?}
Latch -->|Yes| SetFlag[Latch priority flag,<br>use ClaimID as group key]
Latch -->|No| ClearFlag[Clear priority flag]
Check -->|No| Assign
SetFlag --> Assign[Assign sortBy]
ClearFlag --> Assign
Assign --> EndOk([sortBy assigned])
Failure and edge-case behavior¶
- All non-urgent tasks share one flat sort bucket (
100000000000000); the incrementing variant is commented out in source, so whether the flat bucket is intended is unclear.*
Related documentation¶
Sources¶
- SAIF.Business.Tasks.Claim/clsMyTaskCollection.vb