Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

GetCountryList()' function (2 replies)

$
0
0
Thought I would use the new 'GetCountryList()' function to save a bit of time.
This worked OK and returned 249 rows which I added to an array.

Next I needed to move 'United Kingdom' to be the first option avaiable in the list (combo).

Seemed I had everything I needed.......
lnSeekNdx is int = Nation(nationEnglish)
lnSeekRes

lnSeekRes = ArraySeek(m_Arr_Country,asLinear,"NationID",lnSeekNdx)
IF lnSeekRes > 0 THEN
	ArrayMove(m_Arr_Country,lnSeekRes,1,amMove)
END
The code worked fine however the result was not what I expected as row 1 of the combo now contained information relating to 'Anguilla'.
Investigation showed that both UK and Anguilla have the 'lcNation' element set with the value of 3 - there may be others but I have not looked.

I did think that there might be issues with the USA and its territories but not with the UK.

Now investigating plan B

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>