• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LiveCloud arrays and Datagrid
#3
Hi Efrain

Thank you very much man

I used that bit of code to populate the datagrid successfully and did a dance of joy, I had to modify it slightly to work with the datagrid helper plugin.

Anyway, Im new to programming and am trying to use livecloud to build a retail system I have dreamed about. A lot has to do with queries between dates so I modified your code to include a code snippet that LCM produced . It works on LCM and I get the records between the 2 dates and i was happy...but I cannot get it to repopulate the datagrid with the results. Here is the code...Im hoping you can tell me where I went wrong:

Code:
on mouseUp
 
  put empty into field "searchAllField"
  put empty into field "foundLogsLabel"
  put "Search all fields by typing here" into field "searchAllFieldsLabel"
 
  local tKeys, tOutputA, tCount, tDataA, tInputA
 
  --code snippet
  set the dgData of group "DataGridLogs" to empty
 
  put cdb_TableID("logs") into tTableID
  //put cdb_tableKeys("logs") into tKeys
  put "date" into tInputA[tTableID]["query2"]["key"]
  put "<=" into tInputA[tTableID]["query2"]["operator"]
  put "12/13/19" into tInputA[tTableID]["query2"]["value"]
  put "date" into tInputA[tTableID]["query1"]["key"]
  put ">=" into tInputA[tTableID]["query1"]["operator"]
  put "12/01/19" into tInputA[tTableID]["query1"]["value"]
  put cdb_batchQuery(tInputA,"cloud","logicalAND","recordData") into tOutputA
 
  --
 
 
 
  //put cdb_read("logs", "*", "cloud") into tOutputA
 
  put 0 into tCount
  repeat for each key xRecordID in tOutputA
     add 1 to tCount
     
     put tOutputA[xRecordID]["cdb"]["cdbRecordID"] into tDataA[tCount]["recordID"]
     repeat for each item xKeyName in tTableID
        put tOutputA[xRecordID][xKeyName] into tDataA[tCount][xKeyName]
     end repeat
  end repeat
 
  set the dgData of group "DataGridLogs" to tDataA
  set the dghProp["saved data"] of group "DataGridLogs" to tDataA
 
  //set the dgData of group "DataGridLogs" to tOutputA
  //set the dghProp["saved data"] of group "DataGridLogs" to tOutputA
 
end mouseUp


I tried messing with it , by changing the tTableID to tKeys and hoping it will work, but nothing, some of the commented code I uncommented to see if putting the data into tOutputA will work

I know the query works on LCM.


WIll appreciate the help
   
  Reply


Messages In This Thread
LiveCloud arrays and Datagrid - by Bizbuzz - 11-21-2019, 11:01 AM
RE: LiveCloud arrays and Datagrid - by efrain.c - 11-21-2019, 07:03 PM
RE: LiveCloud arrays and Datagrid - by Papa Cann - 02-23-2020, 03:47 PM
RE: LiveCloud arrays and Datagrid - by efrain.c - 02-24-2020, 06:26 PM
RE: LiveCloud arrays and Datagrid - by sid - 12-14-2019, 11:27 PM
RE: LiveCloud arrays and Datagrid - by sid - 12-16-2019, 09:31 PM
RE: LiveCloud arrays and Datagrid - by efrain.c - 12-17-2019, 02:14 AM
RE: LiveCloud arrays and Datagrid - by sid - 12-17-2019, 09:54 PM
RE: LiveCloud arrays and Datagrid - by sid - 12-18-2019, 10:20 PM
RE: LiveCloud arrays and Datagrid - by sid - 12-19-2019, 10:12 PM
RE: LiveCloud arrays and Datagrid - by sid - 02-14-2020, 02:56 PM
RE: LiveCloud arrays and Datagrid - by efrain.c - 02-14-2020, 08:47 PM
RE: LiveCloud arrays and Datagrid - by sid - 02-15-2020, 07:52 PM
RE: LiveCloud arrays and Datagrid - by sid - 02-24-2020, 07:52 PM
RE: LiveCloud arrays and Datagrid - by efrain.c - 02-24-2020, 09:17 PM
RE: LiveCloud arrays and Datagrid - by sid - 02-24-2020, 09:39 PM
RE: LiveCloud arrays and Datagrid - by sid - 06-26-2020, 11:34 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)