i have a map "m" filled and then i compile another map "filesMap" with some elements from first map:
B4X:
For i = 0 To (m.Size / 9) - 1
filesMap.put( m.Get("ID"), m.Get("Title"))
...
next
with this control it's all ok!:
B4X:
Dim i As Int
Log("filesMap.Size:" & filesMap.Size)
For i = 0 To filesMap.Size - 1
Log("Key:" & filesMap.GetKeyAt(i) & " - " & "Value:" & filesMap.GetValueAt(i))
Next
and the result is (for example):
Key:33297 - Value:Everybody's Broken
Key:33290 - Value:Lost Highway
but if i do:
B4X:
Msgbox(filesMap.get(33297), "GetField")
or
Msgbox(filesMap.get("33297"), "GetField")
You have m.size / 9. this will result in a non int variable depending on the value of m.size. You should do this before the loop and convert the answer to an int if it is not.
OK, in your loop that shows the key 33297, also log the length of it to the log. It should be 5. Maybe there is a hidden character, etc. So see what the logged length is.