Hello everyone! For some reason, this type of query is not working for me. I test with Wherewqualto2 and whereEqualToString. Returns all records in the collection.
Any help you can give me?
Collection viajes
Any help you can give me?
B4X:
fs.Initialize("Firestore",True)
Dim listar_vuelos As CollectionReference= fs.collection("viajes","listar_viajes")
If Starter.auth.CurrentUser.IsInitialized Then
If listar_vuelos <> Null Then
listar_vuelos.orderBy("fecha_origen").whereEqualToString("usuario_Uid",Starter.auth.CurrentUser.Uid).fetch("listar_viajes_result")
ProgressBar1.visible = True
wait for listar_viajes_result_snapshot(success As Boolean, data As QuerySnapshot, info As String)
If success Then
If data.Size > 0 Then
Dim documento As List = data.Documents
CustomListView_proximos_viajes.Clear
CustomListView_viajes_anteriores.Clear
If documento.IsInitialized Then
For i = 0 To documento.Size-1
ProgressBar1.Visible = False
Dim docsnap As DocumentSnapshot = documento.Get(i)
docsnap.getDocumentReference("viajes")
Dim datos As Map = docsnap.Data
If Starter.authex.CurrentUser.Uid = datos.Get("usuario_Uid")Then
insertar_viajes(datos)
End If
Next
End If
Else
ProgressBar1.Visible = False
ToastMessageShow("No tiene viajes creados",False)
End If
End If
End If