Alternate Match Codes (To be removed)
Description
The Alternate Match Codes screen appears when the system finds multiple valid matches for a scanned item in the match database. Instead of automatically selecting one match, the user must choose which specific item they intend to scan. This screen is triggered in two contexts: during normal scanning in Add Scans mode, and during Zone Linking when matching zone identifiers. The system displays a list of all possible matches with their identifying information, allowing the user to select the correct one by scanning its alternate match code or choosing from the list.
When This Screen Appears
Scan Mode Context
When scanning an item in the Add Scans screen:
- User scans or enters a value for a scan flow step that has matching enabled.
- SubmitOpenScanProperty queries the match database for that value.
- The match database returns multiple possible matches (stored in
alternateMatchCodes). - If
showDialogis true in the alternate match codes result, the system navigates to this screen. - The open scan is saved with the alternate match codes attached, waiting for user selection.
- User must select one of the alternate matches to continue scanning.
Zone Linking Context
When linking zones:
- User scans a zone linking step value (like a location code or zone identifier).
- SubmitOpenZoneLinkingProperty queries the match database.
- Multiple zones match the scanned value.
- System navigates to this screen to let user choose the correct zone.
- User selects the intended zone to complete the linking process.
Functionality
Selection Options
- Scan to Select: User can scan the alternate match code shown in the list to automatically select that match.
- Tap to Select: User can tap a match from the displayed list.
- Search: User can type to filter the list of alternate matches.
After Selection
Once the user selects a match:
- The system submits the selected match code back through SubmitOpenScanProperty (Scan mode) or SubmitOpenZoneLinkingProperty (Zone Linking mode).
- The
discardMatchCodesparameter is set to true to clear the alternate matches. - The
clearPropertiesparameter is set to true (Scan mode only) to restart the scan with the selected match. - The screen exits and returns to the previous flow.
- The selected match data populates the relevant fields automatically.
Validation After Selection
Even after the user selects an alternate match, that selection goes through validation:
- If the selected match code fails validation (e.g., doesn't actually exist), a MatchFailedException is shown.
- If
allowNotMatchedis true, user can proceed anyway with a warning. - If validation succeeds, the match data is applied and the user returns to the scan flow.
Fields
- Search Text: Filter the list of alternate matches by typing.
Error Messages
- Match code not found: The scanned or entered value doesn't match any of the alternate match codes in the list.
- MatchFailedException: The selected alternate match code failed validation when resubmitted.
- NonExistingStep: The scan flow step or zone linking step associated with the alternate matches no longer exists (cleans up invalid state).