Adding Custom Fields To BO Datatable


Author
Message
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I've seen a forum post on this before but can't seem to locate it.



I want to add a few temporary fields to a business object's datatable on a row by row basis to store status information but can't seem to get it to work properly at runtime. I don't want to add the fields to the database table, just to the business object.



Any help would be appreciated.



Thanks,

Tim

Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Tim,



One last thing that might make life easier. You can use your query that fills the BO to make that extra column. I.e. extending the example



SELECT

-- First three columns are all "official" columns and will be saved by the BO

cs_FirstName,

cs_LastName,

cs_ID,

-- Any number of "extra" columns can be added as needed.

FALSE AS cs_Processed, -- this adds a column to underlying datatable with a default value

0 AS cs_Status -- Example of a couple more added columns, an int and a string

'P' As cs_StatusDisplay

FROM Customers



Using this method, you can then use either of the methods Dustin described to access/change the data.
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Thanks guys, your examples helped solve my problem.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad you got it working!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search