09-10-2011 11:29 AM
Create an ACTFieldType of VIRTUAL. In the field descriptor allow the field selected portion of the select string to be edited. This way we can use SQL Functions:
CAST(ROUND(SalesYTD/CommissionPCT, 0) AS int) AS Computed
It could replace my previous request for GUID type fields since we could create our own ID field using characters
Think of all the DateDiff functions it would open up:
DATEDIFF(day, OrderDate, GETDATE()) AS NumberOfDays
DATEDIFF(dd, [User].DOB, GetDate()) / 365) as YearsOld
This would be helpful for many places such as math, date aging, reporting! and any other tool accessing the ACTOLEDB2.1 reader!
When building the SQL string from the field descriptors it would look like this
Select Contact, City, State, Zip, CAST(ROUND(SalesYTD/CommissionPCT, 0) AS int) AS Computed from Contacts.
Thanks for your time.
-- Jim Durkin