Missing keys in datagrid?

Paul Dupuis paul at researchware.com
Tue Dec 17 15:36:59 EST 2019


I am not 100% sure about the datagrid, but in regular arrays, if your d 
not set a key, it will not be present.

So, if you never put a value into tt[1][statusstatus] then the key 
[statusstatus] will not be in the list of keys for tt[1]. If you want 
all keys to be present for each row, then you need to set them to some 
value, even if an empty string by 'empty' or ""


On 12/17/2019 3:13 PM, Klaus major-k via use-livecode wrote:
> Hi friends,
>
> I have a datagrid "produkte" of type Table with these 12 columns:
> 1. lfd_nummer
> 2.Titel
> 3.sid
> 4.währung
> 5.Kupon
> 6.barriere
> 7. Verfallsdatum
> 8.Basiswerte
> 9. status
> 10. statusstatus
> 11. abruffehler
> 12. abruffehlermeldung
>
> But when I fire this in the messagebox:
> send "printkeys" to grp "produkte", I only get 10 keys?
> 1
> Verfallsdatum: ``
> abruffehlermeldung: ``
> lfd_nummer: `0018`
> status: ``
> sid: `44`
> Titel: `sdsdsdds`
> Basiswerte: `Aktien`
> Kupon: `50.00%`
> barriere: `80.00%`
> währung: `CHF`
>
> Same with:
> put the dgdata of grp "produkte" into tt;put keys of tt[1]
> Verfallsdatum
> abruffehlermeldung
> lfd_nummer
> status
> sid
> Titel
> Basiswerte
> Kupon
> barriere
> währung
>
> Again only 10 keys from total 12!? What am I missing?
> Tested on macOS 10.14.6 with LC 9.05, 9.04 and 9.5.1 GM.
>
>
> Best
>
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list