
286 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
If Instr(cust_id, "[") > 0 And Instr(cust_id, "]") = Len(cust_id) Then
'extract ID from input patameter
cust_id = Strleft(Strrightback(cust_id,"["), "]")
End If
Set view = db.getView("Customers")
'get the document
Set entry = view.GetDocumentByKey(cust_id, True)
If Not entry Is Nothing Then
'read the fields
cInfo.cust_id= entry.getItemValue("cust_id")(0)
cInfo.cust_name= entry.getItemValue("cust_name")(0)
cInfo.cust_amgr= entry.getItemValue("cust_amgr")(0)
cInfo.cust_contact_name= entry.getItemValue("cust_contact_name")(0)
cInfo.cust_contact_position= entry.getItemV ...