maintenance: title: FORM_HYPERLINKS;; mlmname: FORM_HYPERLINKS;; arden: version 2;; version: 4.50;; institution: St Clair Hospital;; author: Robert Spence;; specialist: ;; date: 2008-07-09;; validation: testing;; library: purpose: --TESTING-- ;; explanation: ;; keywords: ;; knowledge: type: data-driven;; data: /****************Make Changes To Spelling And Flags In This Section********************/ // Set to true if a decision.log is needed. log_execution_info:= FALSE; /**************************************************************************************/ // This MLM is passed three arguments // communication_type, form_type and client info object respectively. (this_communication, this_form, client_info_obj) := argument; //Get the calling event and form data calling_event := this_communication.callingevent; calling_form := this_form.name; calling_field_name := this_communication.callingfieldname; field_list := this_form.fields; if calling_field_name matches pattern "%|%" then //Determine the MultiFieldOccNum and DataItemName using a call to another MLM to parse the string parse_mlm :=MLM {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}}; parsed_string := CALL parse_mlm with (calling_field_name,"|"); calling_field := first of parsed_string; multi_field_num := last of parsed_string as number; // Assigns fields passed in the Form object to the Field object mlm_field := first of (field_list where field_list.DataItemName = calling_field AND field_list.control_multifieldoccnum = multi_field_num); else mlm_field := first of (field_list where field_list.DataItemName = calling_field_name); endif; //Retrieve the hyperlink substring from the field value substring_mlm := MLM {{{SINGLE-QUOTE}}}UTIL_STRING_BETWEEN{{{SINGLE-QUOTE}}}; link_value:=CALL substring_mlm with (mlm_field.value,"(",")"); if exists mlm_field then /****************************************FFI*********************************************/ shell_to_win := INTERFACE {long shell32:ShellExecuteA(long, char*, char*, char*, char*, char*)}; x := call shell_to_win with 0, "open", link_value,NULL, NULL, "SW_SHOWNORMAL"; /**************************************END OF FFI****************************************/ endif; ;; evoke: // No evoke statement ;; logic: conclude true; ;; action: // This MLM returns two parameters, of types: // communication_type and form_type respectively. return this_communication, this_form; ;; end: