/
TccRemoteQueryDatabase.QueryFields

TccRemoteQueryDatabase.QueryFields

Eigenschaft

TccRemoteQueryDatabase.QueryFields : {[FieldName: string] : any}

Beschreibung

Mit QueryFields werden die in der Abfrage verknüpften Felder definiert und die entsprechenden Werte übergeben.

Beispiel

ResetDb: { OnSelect: () => { const db = ccFactory.CreateDatabaseRemoteQuery("ZuF-mV7_wk6sLIRYrYawXQ",`"SELECT * FROM Customers Where City = :Feldname"`,{"Feldname": "Berlin"}); db.ExecAsync().pipe(mergeMap(success=>{ if(success){ db.Reset(); db.SourceId = "lwyRzgyLEe-vV0qTCulcew"; db.Query = `"SELECT * FROM Inventory Where Customer = :Customer"`; db.QueryFields = {"Customer":db.Response.Rows[0]["Id"]}; return db.ExecAsync(); } return of(false); })).subscribe(success=>{ if(success) { const rowcount = db.Response.Rows.length; console.log(db.Response.Columns); if(rowcount > 0) ccFields.SetState("h_inventory", "ccFS_Okay"); else ccFields.SetState("h_inventory", "ccFS_Error", "No inventory found"); } }) } },