BO.GetFieldDescription improvement
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



BO.GetFieldDescription improvementExpand / Collapse
Author
Message
Posted 04/25/2008 1:20:53 PM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 10:30:50 AM
Posts: 106, Visits: 643
Is nice to see that the newer versions have improvements on DDT/MS_DESCRIPTION, some time ago I post a question about it on http://forum.strataframe.net/Topic10737-13-1.aspx and Ben say that DDT not support it yet.
These days, I try to get the MS_description to set column headers descriptions automatically from it and some sort of this stuff. I see that the DDT imports it, the BOMapper Map it to an "Description" attribute of the property of the field. Now I Try to get it with the "GetFieldDescription" method of the businessobjects

I see the help (2 hours later that I was implement it :w00t to see that it exist, this say:

GetFieldDescription Method (FieldName)
--------------------------------------
Returns the extended description for a field name (i.e. Customer's Last Name) from the description attribute on the field property. If the Description() attribute is missing, the actual field name will be returned.

I see that all the properties that map fields from BO have a Description attribute, but when MS_Description doesn't have a value, this value are "" (Empty), and when I call MyBO.GetDescription I get a empty value (and not the one from the MyBo.somefieldname)

I "fix" that with this code:
MyDescription = _MyBO.GetFieldDescription("MyField") '<-- it retrieve a empty value
If String.IsNullOrEmpty(MyDescription) Then
MyDescription = _MyBO.GetPropertyDescriptor("MyField").DisplayName
End If

It worked Ok, but I suppose that it is good that if GetFieldDescription detect a empty description atttibute, it retrieve the "somefielname" property string

Thanks for the great support

Fabian.
Post #15893
Posted 04/25/2008 1:26:32 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
You can already do this.  It was an enhancement that was released with the 1.6.5 build.  If you open up the customization for a field within the BO Mapper, you can override the field level description with any value regardless of the database. 

Post #15895
Posted 04/25/2008 1:49:50 PM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 10:30:50 AM
Posts: 106, Visits: 643
I known this and this is awesome but I was try to say that when It not have a description (it leave blank) and the MS_Description is blank, the BO Mapper create an empty "Description" attribute on the field properties, and then the method GetFieldDescription of the created business object retrieve an empty string ("") and not the fieldname. only this, I fixed that with the previosly posted "fix" but only post it.

I like to generate automatic code witout creating a table dictionary to tables, and tt is great that the MS_Description is imported on DDT / BOM, I don't need really more that it

Thanks Trent for the fast fastest response.
Post #15901
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 10:38pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 13 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.