TDADatatable.Locate

how do i add a calculated field to a DADatatable at runtime?
i guess that will be the easiest way to accomplish what i need…

as usually via table.Fields.Add.
also you can define calculated field into .daSchema via DASM

ok, but even then it does not work (modified the source myselves)…
that results in an empty detail,
i guess cause the search is done 2 times and in my case the 2nd locate does not match of course
i need an OR kind or locate

so the calc field will be the only solution i guess

DASM i know :slight_smile:
but want to try in code before going that way

and code does not work cause for some reason it’s creating an index on the calc field which isn’t allowed…

ok.
how you can use calc field in index:
declare calc field as usual field (in SQL, it will be like -1 as myfld), disable logging for this field. calculate value in the bin2.OnReadFieldValue event

ended up with fetching the 2 child id’s in sql… i couldn’t get devex grid show it correctly (at this point)
so case closed :slight_smile:

1 Like

bugs://82162 got closed with status fixed.