How do I fetch data from a subform?
Here is the scenario:
Form 1: Submit_issue
Fields:
- WorkOrder (autonumber)
- Issue (multiline)
- Notes (subform - form 2)
Form 2: Notes
Fields:
Form 3: Open_Issues
Fields :
- This_work_order (lookup field -> from work order on Form 1)
- Notes (note field where I output data)
Submit_issue form has a subform called Notes. So within the subform you can submit as many notes a you like as it pertains to the main form (Submit_issue).
I am trying to fetch the records (on the 3rd form that is stateless) that are associated with the subform (Notes) as it is associated with the main form (Submit_issue). For some reason I cant seem to get the data.
Here is what I have in the script so far:
ThisIssue = Submit_issue [ID == input.This_work_order];
TheNotes = Notes [ID == ThisIssue.ID];
for each t in TheNotes
{
input.notes = "Notes:" + t.Note;
}
Im stuck here and cant get the data to show up. Any help would be gratefully appreciated!
Thx,
Scott