| | | 
StrataFrame Novice
       
Group: StrataFrame Users Last Login: Yesterday @ 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. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 11:54:01 AM Posts: 4,104, Visits: 4,177 |
| | 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.  |
| | | | 
StrataFrame Novice
       
Group: StrataFrame Users Last Login: Yesterday @ 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. |
| |
|
|