Fetch and display multiple records from stringlist on user input
Hi, I'm a newbie developer. I'm trying to figure out how to write a script, but my brain is hurting.
In a form called Add_to_Assignments I have a lookup field called COMPETENCY_A_A that's displayed as multi-select checkboxes. The data is from a form called Add_to_Competencies that has two fields: COMPETENCY and AREA_OF_KNOWLEDGE_C. In the Add_to_Competencies form, the AREA_OF_KNOWLEDGE_C field is a single-select dropdown lookup from a form called Add_to_Areas_of_Knowledge.
What I'd like to do is write an on user input script for the Add_to_Assignments COMPETENCY_A_A field that will display multiple values. So when a user checks Competency #1, the associated Area of Knowledge #1 will display, and when the same user checks Competency #2, the associated Area of Knowledge #2 will also display.
My first question is what kind of input field to make on the Add_to_Assignments form to display the multiple Areas of Knowledge that go with the Competencies checkboxes. Lookup? Multi-line? Checkboxes? And then my second question is, What next?
I did manage to get something that almost works with this code that sets a collection variable "comp" and displays in a multi-line field AREA_OF_KNOWLEDGE_A_A1:
comp = Add_to_Competencies [COMPETENCY in input.COMPETENCY_A_A];
input.AREA_OF_KNOWLEDGE_A_A1 = comp.AREA_OF_KNOWLEDGE_C;
But what happens is that when you check a second checkbox, the value gets replaced instead of added. How can I get multiple values to display?