I'm getting an unexpected result processing a simple list.
I create a CR LF list, let a user pick more than 1 choice, then convert the result to a comma delimited list. The last result chosen always becomes the first entry in the comma delimited list (at least in my tests). This is not something that is happening as a result of the CRLF_TO_COMMA() function, which preserves the original order.
Here's the code that demonstrates this. Am I doing something wrong?
I create a CR LF list, let a user pick more than 1 choice, then convert the result to a comma delimited list. The last result chosen always becomes the first entry in the comma delimited list (at least in my tests). This is not something that is happening as a result of the CRLF_TO_COMMA() function, which preserves the original order.
Here's the code that demonstrates this. Am I doing something wrong?
Code:
dim vIncludeTypes as c DELETE a_vIncludeTypes DIM a_vIncludeTypes[17] as c dim temp_list as c temp_list = <<%list% All Bank AccountsReceivable OtherCurrentAsset FixedAsset OtherAsset AccountsPayable CreditCard OtherCurrentLiability LongTermLiability Equity Income CostofGoodsSold Expense OtherIncome OtherExpense NonPosting %list% a_vIncludeTypes.initialize(temp_list) dim temp_comma1 as c temp_comma1 = crlf_to_comma(temp_list) msgbox("1st Results",temp_comma1+CRLF(2)+"NOTE THE ORDER OF ITEMS IS PRESERVED") ok_button_label = "&OK" cancel_button_label = "&Cancel" varC_result = ui_dlg_box("Choose several and note the order",<<%dlg% Account Types To Include :| [%M%.40,5vIncludeTypes^#a_vIncludeTypes]; <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>; %dlg%) dim temp_comma2 as c temp_comma2 = crlf_to_comma(vIncludeTypes) msgbox("2nd Results",temp_comma2+CRLF(2)+"NOTE THE ORDER OF ITEMS IS NOT PRESERVED")
Comment