Hi all,
How do I get the return value from an ARRAY?
How do I get the return value from an ARRAY?
Code:
' DIM SHARED vCust as C DIM SHARED varC_result as C auto_list_vCust = table.external_record_content_get("customers","Name+'|'+customer_id","Name","") temp_count = w_count(auto_list_vCust,crlf()) DELETE a_vCust DIM auto_vCust[temp_count] as c auto_vCust.initialize(auto_list_vCust) dim vSelected as c '========== 'vCustList = get_Customer_list() dim cFieldList as C dim nCounter as N dim nRecordCount as N dim cWord as C dim cVendor as C cFieldList = "< New Record >"+crlf()+ table.external_record_content_get("Customers",\ "Name+ '|' + customer_id","Name") ' -' : '+department nRecordCount = w_count(cFieldList,crlf()) if (nRecordCount = 0) then end end if DIM choice_list[nRecordCount] as c for nCounter = 1 to nRecordCount cWord = word(cFieldList, nCounter, crlf()) choice_list[nCounter].value = word(cWord, 2, "|") choice_list[nCounter].text = word(cWord, 1, "|") next nCounter '========== ok_button_label = "&OK" cancel_button_label = "&Cancel" varC_result = ui_dlg_box("Combo Box Style",<<%dlg% {region} Typical Action ComboBox - shows all of the fields;{endregion}; {region} Select a Customer:| [.65vActSelected^+auto_vCust!vAuto_Changed];{endregion}; {lf=3}; {region}Modified ComboBox - Do not show the "Customer_id" after pipe | but ;{endregion}; {region} Select a Customer:| [.65vSelected^+choice_List!vChanged]; {endregion}; {line=1,0}; {region} <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion}; %dlg%,<<%code% If a_dlg_button = "vAuto_Changed" then msgbox("test","Returned as "+vActSelected) a_dlg_button ="" end if If a_dlg_button ="vChanged" then 'what is the only Id value [SIZE=4][COLOR="#FF0000"]'How to get the Value which is after pipe ==> choice_list[nCounter].value = word(cWord, 2, "|") ?[/COLOR][/SIZE] vKeyId = choice_list.matching("name="+quote(vSelected)) 'vKeyId = choice_list.dump_properties("name","name="+quote(var->vSelected)) 'vKeyId = choice_list[a_dlg_button] 'vKeyId = choice_list[val(substr(vSelected,2,2))] [COLOR="#0000FF"]msgbox("test ", "result Variable Field is "+vSelected+crlf()+" and Id ? "+vKeyId )[/COLOR] a_dlg_button ="" end if %code%)
Comment