Hi All,
I could not able to create the array with this. I want to see the colorName on a Drop-down and find the ColorId at event with an array.
I could not able to create the array with this. I want to see the colorName on a Drop-down and find the ColorId at event with an array.
Code:
dim rc as N dim selectOne as C dim i as N dim indx as N dim rc as n 'colorName+'|'+colorId mydata=<<%list% blue|1 red|2 green|3 yellow|4 pink|5 %list% rc = *count(mydata) 'call array dim names[rc] as p dim namesList[rc] as c 'How do I create the list to populate? 'names.initialize_properties("colorName+'|'+colorId",Mydata) ' [COLOR="#FF0000"][B]Is it right code? [/B][/COLOR] dim cNameKeyId[rc] as c cWord="" i = 0 for i = 1 to rc cWord = word(mydata,i,crlf()) nameslist[i] = word(cWord,1,"|") 'only list ok 'cNameKeyId[i] = word(cWord,2,"|") 'not able to find the Id next namesList.sort() ui_dlg_box("Choose Message Recipient",<<%dlg% {Xsize=2}{startup=init} {region} dropdown box; [.37vSelectOne^+nameslist!change]||<Result!ok2>;; {endregion}; %dlg%,<<%code% If a_dlg_button ="Init" then 'selection = 1 'selectOne = nameslist[1] 'indx2 = 1 a_dlg_button ="" else if a_dlg_button = "change" 'ddwn case indx2 = namesList.find(vSelectOne) a_dlg_button = "" else if a_dlg_button ="ok2" 'show ddwn result msgbox("selection",alltrim(str(indx2))) 'No of the selection from list [COLOR="#FF0000"][B]'How do I to find the ColorId?[/B][/COLOR] from pointer or character array? ''vResult2 = namesList[indx2] ''vResult2 = cnameKeyId[indx2] 'vResult2 = names.find(vSelectOne,"colorId") 'msgbox("Result Id",vResult2) a_dlg_button="" end if %code%)
Comment