Hello,
I have a customlistView who is populate with this job.
But i need to have a select for each row to know their rating (in another table and i can't do one Sql Select for both like INNERJOIN...
I use another job in this job ?
Regards
here is the other table
I have a customlistView who is populate with this job.
But i need to have a select for each row to know their rating (in another table and i can't do one Sql Select for both like INNERJOIN...
I use another job in this job ?
Regards
B4X:
Sub JobDone (Job As HttpJob)
ProgressDialogHide
If Job.Success Then
Dim res As String, action As String
res = Job.GetString
'Log("Back from Job:" & Job.JobName & ", Success = " & Job.Success)
'Log("Response from server: " & res)
Dim parser As JSONParser
parser.Initialize(res)
Select Job.JobName
Case "httpSearchResult"
Dim infos As List
infos = parser.NextArray 'returns a list with maps
For i = 0 To infos.Size - 1
Dim m As Map
m = infos.Get(i)
Dim tempUser As Person
tempUser.prenom = m.Get("Prenom")
tempUser.nom = m.Get("Nom")
tempUser.id = m.Get("id")
tempUser.poste = m.Get("Metier")
tempUser.poste = tempUser.poste.Replace("\'", "'")
tempUser.competence1 = m.Get("Competence1")
tempUser.competence1 = tempUser.competence1.Replace("\'", "'")
tempUser.competence2 = m.Get("Competence2")
tempUser.competence2 = tempUser.competence2.Replace("\'", "'")
tempUser.competence3 = m.Get("Competence3")
tempUser.competence3 = tempUser.competence3.Replace("\'", "'")
tempUser.statutDipo = m.Get("Disponible")
tempUser.typeDeCompte = m.Get("TypeDeCompte")
tempUser.telMobile = m.Get("TelMobile")
tempUser.avatarNom = m.Get("Avatar")
If m.Get("Lat") <> Null Then
If m.Get("Lat") <> "" Then tempUser.lat = m.Get("Lat")
End If
If m.Get("Lng") <> Null Then
If m.Get("Lng") <> "" Then tempUser.lng = m.Get("Lng")
End If
custlist.Add(addLabel (i, 100%x -20dip, 200dip, tempUser),200dip, "secteurActivite", False)
'****** I NEED TO DO A SELECT FOR EACH id TO KNOW RATINGS ***************
Next
End Select
Else
'Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
here is the other table