Filling Out Data Grid With Tab Delimited Data Problem

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Not a lot of thought
Posts: 77
Joined: Thu May 21, 2015 2:41 am

Filling Out Data Grid With Tab Delimited Data Problem

Post by Not a lot of thought » Sun May 21, 2017 4:30 am

I have a data grid named "Delays_List" which I copied from a card where the data input (tab limited information from a database query) fills out the grid. Below is my code, but for some reason it will not work on this card. (I have three data grids in the stack, this is the only one on this card). The other two function just fine. I've double checked to confirm that the query was working properly and filling out the variable "FoundDelays". All good. I feel like I'm overlooking something, but I literally went line by line in the code to confirm that it was working properly. I didn't know if there was a limit for data grids or if there were some reason that it would not fill out the grid. When I run the code, a "Custom Property" is created called dgtext and the information is populated in the "Property Content" text box, but nothing happens in the grid. I did rename the group from the original name (both the group the data grid was in and the data grid itself).

Found Delays: 1 1 FFGA13441 2017-05-19 13:32:50 0000-00-00 00:00:00 Obstruction This is a test 11GWJCS624BQ 1
There are ten

put revDataFromQuery (tab, return, gDatabaseID, tSQL,"gCriteriaV", "gComp_No", "gJobID" ) into FoundDelays


else
end if

end if
set the itemdelimiter to comma
put item 1 of FoundDelays into testDelay

if FoundDelays is empty or testDelay = "revdberr" then
set the dgtext of grp "Delays_List" to empty
else
set the dgtext of grp "Delays_List" to FoundDelays
end if
put empty into field "DelayNoSearch"


There was previously a send message to send a mouseUp to a different object after this code, which did empty out the contents. I've since removed that. However, I don't feel that it would have been the reason why it is currently not working, unless there might be a case where the code might not have been fully deleted somehow.

Ledigimate
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 132
Joined: Mon Jan 14, 2013 3:37 pm

Re: Filling Out Data Grid With Tab Delimited Data Problem

Post by Ledigimate » Tue May 23, 2017 9:48 pm

Hi Nalot

It sounds like the "Delays_List" datagrid is broken and you may have to re-create it. Setting the dgtext of a working datagrid should not create a custom property called dgtext!
Or perhaps the datagrid's parent group is the same size as the datagrid itself, making it seem like you've selected the datagrid when you've actually selected its parent group? In that case you might have renamed the parent group thinking that you were renaming the datagrid.

- Gerrie
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101

Not a lot of thought
Posts: 77
Joined: Thu May 21, 2015 2:41 am

Re: Filling Out Data Grid With Tab Delimited Data Problem

Post by Not a lot of thought » Mon May 29, 2017 1:14 pm

....I figured it out. The lockmessages function was turned to true before the "set dgtext" line which was preventing the line from executing properly. I'm not sure if I'm saying this correctly, but after a few hours of going through each line of code that was the problem. I turned the lockmessages off before the "set dgText" line and it worked liked a charm.

Thanks for the help Gerrie

Chris

Post Reply

Return to “Talking LiveCode”