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
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
Dustin,



The second option is close. I want to add the column to the datatable and be able to populate it like any other field on the business object, except it won't get saved. I don't need to populate the new field after filling the object.



Example: I want to add a boolean field to the internal datatable called 'cs_Processed'.



I want to be able to set the field cs_Processed = True as I process the rows somewhere in a update routine. After the update is done, I want to loop through the business object and check to see what rows were not processed correctly, cs_Processed = False.



Hope that helps clarify.



Thanks,

Tim

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Tim,



You can have your cs_Processed field in the table and it will be created in the BO, then you can add cs_Processed to the BO.FieldsToExcludeFromUpdate property so it won't be updated.



Or as Dustin suggested, you can have a Custom Field Property in your BO, then use it normaly as any other field, and no data will be save back since it is not binded to anything.



Other suggestion is that if you allow your users to set the cs_Processed flag, then you can use a ListView with its CheckBoxes property True and then this will add a checkbox on the first column where you can check and then you can use the ListView.CheckedItems.Count > 0 to see which one have been checked and process your records.

Edhy Rijo

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