David:

I use the ALP 9.9.5 docs in PDF format. Look at the command
"AL_AddCalculatedColumn"
and then click the link on that page to get to "Calculated columns"

--
Douglas von Roeder
949-910-4084


On Tue, Oct 19, 2021 at 1:15 PM David Rose via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I am converting some older ALP code in a v17 database to the modern code.
> In the old code, if you have an area that is displaying fields, and you
> have a calculated column you would do this:
>
> $Error:=AL_SetFields ($Area_l;$TableNumber_i;4;1;0)  //specifies the col
> as a calculated one
>
> Then this:
> AL_SetCalcCall ($Area_l;4;"MyCalcCallMethod")
>
> In the new code we set the fields like this:
>
> ARRAY POINTER(aPtr;4)
> aPtr{1}:=->[Vendors]ID
> aPtr{2}:=->[Vendors]Last_Name
> aPtr{3}:=->[Vendors]First_Name
> aPtr{4}:=?? (see below)
>
> $err:=AL_SetObjects ($Area_l;ALP_Object_Columns;aPtr)
>
> And the callback method like this:
> AL_SetColumnTextProperty ($Area_l;4;ALP_Column_Callback;"MyCalcCallMethod
> ")
>
> I didn't see in the docs what you assign to the aPtr array element for the
> calculated column. If I size the aPtr array to 3, then set a callback
> method for column 4, I get an error.
> Ditto if I size the array to 4 but don't assign anything to the 4th
> element.
>
> Pls advise.
> TIA,
> David
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to