Hi
I am trying to compare the results in two MAPS so that I can write the differences into either another MAP or LIST.
I need to match the ID's of each map to make sure I am looking at the same record, as the maps might not be in the same order. I am storing the same data layout in each map but from different sources.
ie
MAP1 {EmployeeID=0001, Firstname=John, Surname=Doe, FullName=John Doe, SiteID=243, LastChangedDate=12/10/2019 15:32:22}
MAP2 {EmployeeID=0001, Firstname=John, Surname=Doe, FullName=John Doe, SiteID=245, LastChangedDate=13/10/2019 17:05:10}
MAP2 has LastChangedDate as changed along with SiteID as changed so I will capture these changes and write into a new MAP or List.
I have tried various methods and have not been successful, so am looking for some guidance on the best way to tackle this.
Any help to point me in the right direction would be highly appreciated.
Thanks
Mark
I am trying to compare the results in two MAPS so that I can write the differences into either another MAP or LIST.
I need to match the ID's of each map to make sure I am looking at the same record, as the maps might not be in the same order. I am storing the same data layout in each map but from different sources.
ie
MAP1 {EmployeeID=0001, Firstname=John, Surname=Doe, FullName=John Doe, SiteID=243, LastChangedDate=12/10/2019 15:32:22}
MAP2 {EmployeeID=0001, Firstname=John, Surname=Doe, FullName=John Doe, SiteID=245, LastChangedDate=13/10/2019 17:05:10}
MAP2 has LastChangedDate as changed along with SiteID as changed so I will capture these changes and write into a new MAP or List.
I have tried various methods and have not been successful, so am looking for some guidance on the best way to tackle this.
B4X:
Dim RMAP as map
Dim LMAP as map
RMAP.initialise
LMAP.initialise
For Each value in RMAP.Values
For Each value in LMAP.Values
If RMAP.GET(value)=LMAP.Get(value) Then
'do something here
End If
Next
Next
Any help to point me in the right direction would be highly appreciated.
Thanks
Mark