This document traces the event flow in the Multi-Resource Scheduling Board when the form receives initial context values from another form (via context.initialValueIn).
Form_OnLoad
↓
AfterInitialize
↓
[Condition Check: context.initialValueIn.ValueIn exists?]
↓
YES → setIDFromValueIn
↓
[Switch on context.initialValueIn.Like]
↓
├─ "JobResource.ResourceID" ────────→ SetResourceID_ValueIn → [END]
├─ "JobResource.ResourceIDDesc" ────→ SetResourceID_ValueIn → [END]
├─ "JobHead.JobNum" ────────────────→ SetJobNum_ValueIn
└─ "MfgJobHead.JobNum" ─────────────→ SetJobNum_ValueIn
↓
GetJobResourcesList
↓
Check_ResourceList_HasRows
↓
Execute_SearchOnResource_OnSuccess
↓
AppendToSearch_CheckForDuplicate
↓
[Check for duplicate ResourceID]
↓
NOT DUPLICATE → AppendToSearch_LndPageGrid
↓
CommitDataView → [END]
Location: Lines 97-118
Trigger: Called from Form_OnLoad via SysAfterInitialize
Actions:
- Calls
GetSchedulingFlags - Checks condition:
context && context.initialValueIn && context.initialValueIn.ValueIn- Success Path: →
setIDFromValueIn - Failure Path: →
Execute_LandingPage_Search(standard search dialog)
- Success Path: →
Location: Lines 920-967
Purpose: Route incoming context to appropriate handler based on the source form
Actions:
Uses a switch statement on session.context.initialValueIn.Like to determine context source:
When the user navigates from a Resource-related form:
- Case 1:
"JobResource.ResourceID" - Case 2:
"JobResource.ResourceIDDesc"
Both cases → SetResourceID_ValueIn
When the user navigates from a Job-related form:
- Case 3:
"JobHead.JobNum" - Case 4:
"MfgJobHead.JobNum"
Both cases → SetJobNum_ValueIn
Location: Lines 974-985
Purpose: Directly populate the ResourceID field
Actions:
{
"type": "row-update",
"param": [{
"columns": [{
"epBinding": "KeyFields.ResourceID",
"value": "%session.context.initialValueIn.ValueIn%"
}]
}]
}Result: Updates the ResourceID search field with the passed value
Flow Ends Here ✓
Location: Lines 992-994
Purpose: Initiate resource lookup for a job
Actions:
- Calls
GetJobResourcesListevent
Location: Lines 873-917
Purpose: Retrieve all resources associated with the job
Actions:
-
REST API Call:
- Service:
Erp.BO.JobEntrySvc - Method:
GetDatasetForTree - Parameters:
ipJobNum: Value fromsession.context.initialValueIn.ValueInipStartAssemblySeq: 0ipCurrentAssemblySeq: 0ipCompleteTree: falseipJobTypeMode: null
- Service:
-
Response Handling:
- Maps
returnObj.JobResources→ResourceListdataview
- Maps
-
On Success:
- Calls
Check_ResourceList_HasRows
- Calls
Location: Lines 329-336
Purpose: Verify resources were found
Actions:
- Condition:
%ResourceList.hasRow%- Success: →
Execute_SearchOnResource_OnSuccess - Failure: Flow ends (no resources found)
- Success: →
Location: Lines 346-350
Purpose: Iterate through all retrieved resources
Actions:
{
"type": "dataview-condition",
"param": {
"expression": "ResourceList.ResourceID = ResourceList.ResourceID",
"dataview": "ResourceList",
"result": "matches",
"iterativeEvent": "AppendToSearch_CheckForDuplicate"
}
}- Loops through each row in
ResourceList - For each row, calls
AppendToSearch_CheckForDuplicatewith the row asmatches
Location: Lines 405-417
Purpose: Prevent duplicate resources in the landing page grid
Actions:
-
Check Expression:
trans.dataView('LandingPage').data.findIndex(x => x.ResourceID == '{matches.ResourceID}') == -1
-
If NOT Duplicate (Success):
- Calls
AppendToSearch_LndPageGrid - Calls
CommitDataView
- Calls
-
If Duplicate (Failure):
- Skips to next resource (no action)
Location: Lines 444-447
Purpose: Add resource to the landing page grid
Actions:
{
"type": "row-copy",
"param": {
"fromDataView": "matches",
"toDataView": "LandingPage",
"row-current-set": false
}
}Location: Lines 427-438
Purpose: Persist changes to dataviews
Actions:
- Commits
KeyFieldsdataview - Commits
LandingPagedataview
Flow Ends Here ✓
When a user navigates from a Resource form (e.g., right-click → Multi-Resource Scheduling Board):
- Resource ID is directly populated in the search field
- User can immediately view the scheduling board for that resource
When a user navigates from a Job form (e.g., from Job Entry):
- System retrieves all resources associated with the job
- All unique resources are added to the landing page grid
- User sees a list of resources involved in the job
- User can then proceed to view the scheduling board
- KeyFields: Contains search parameters (ResourceID, StartDate, EndDate)
- LandingPage: Grid displaying selected resources before viewing the board
- ResourceList: Temporary storage for resources retrieved from job operations
- TransView: Transaction view containing system state and flags
This flow is triggered when:
- User clicks a related link from another form
- Another form passes context via the
app-openaction withinitialValueInparameter - The
Likeproperty indicates the source data type (Resource or Job)