Now that you have associated an ien for each record displayed in the list box, you can use that ien to display fields from any terminal type entry in the list box that a user selects. To retrieve the fields for any selected terminal type entry, you should create a second custom RPC. This RPC will need to take an input parameter, the record ien, to know which record to retrieve.
To create an RPC routine to retrieve individual terminal type records:
TERMENT(RESULT,IEN) ; retrieve a string of fields for a termtype ; format of results (by field number): ; RESULT(0)=.01^1^2^3^4 ; RESULT(1)=6 ; RESULT(2)=7 ; N I,ARRAY S IEN=IEN_",",RESULT(1)="" D GETS^DIQ(3.2,IEN,".01;1;2;3;4;6;7","","ARRAY") S RESULT(0)="" I '$D(DIERR) D .F I=.01,1,2,3,4 D ..S RESULT(0)=RESULT(0)_ARRAY(3.2,IEN,I)_"^" .S RESULT(1)=ARRAY(3.2,IEN,6) .S RESULT(2)=ARRAY(3.2,IEN,7) K ARRAY Q
>D TERMENT^ZxxxTT(.ARRAY,103)
Confirm that the return array contains the specified fields in the following nodes:
ARRAY(0)=C-HINQLINK^80^#,$C(27,91,50,74,27,91,72)^24^$C(8)^ ARRAY(1)=U $I:(0:255::255:512) ARRAY(2)=U $I:(:::::512) C $I
Once you've tested your routine, and confirmed that it returns data correctly, the next step is to create the RPC that will call this routine.