﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » How to add event to some fields to respond to one method?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 01 Jun 2026 19:16:11 GMT</lastBuildDate><ttl>20</ttl><item><title>How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14858.aspx</link><description>Hi All,&lt;/P&gt;&lt;P&gt;I have a form with some fields including address fields.&amp;nbsp; There is one field FormattedAddress which I have to update with some fields concatenated for an address label.&lt;/P&gt;&lt;P&gt;What would be the best way to address this kind of situation?&lt;/P&gt;&lt;P&gt;So far I am testing in the BO_FieldPropertyChanged event, but I then have to filter this event for the list of fields that will participate in the concatenation format.&amp;nbsp; Just wondering if I am in the correct place or there is any other way to do this?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Fri, 14 Mar 2008 14:26:47 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14912.aspx</link><description>LOL....thanks, Greg!&amp;nbsp; I always truly appreciate your contributions out here!</description><pubDate>Fri, 14 Mar 2008 14:26:47 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14906.aspx</link><description>Hmmmm...good info Trent.  The tables I'm using this on are small and likely to remain small....no wonder I've had no problems.  I'll keep this in mind though, going forward.  This is thread is another excellent example of why SF rocks  :D</description><pubDate>Fri, 14 Mar 2008 13:56:14 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14900.aspx</link><description>All good advice, Greg.&amp;nbsp; I will warn you, though, that the larger your data set becomes, the slower a calculated field becomes...we have just gone through this very thing.&amp;nbsp; So we are bit more leary of calculated fields (in this manner), especially when dealing with character data, than we once were.&amp;nbsp; But we will still do this under certain conditions.&amp;nbsp; If you are expecting this particular table to get very large, then you should probably go with a UDF or sproc, otherwise the calculated field is great.&amp;nbsp; Also, you can test this against your database and see where you get the best performance.&amp;nbsp; Use the SET STATISTICS commands to see what query performance difference you get:&lt;P&gt;[codesnippet]SET STATISTICS PROFILE ON&lt;BR&gt;SET STATISTICS TIME ON[/codesnippet]&lt;/P&gt;&lt;P&gt;That would be the TRUE test on your data.&amp;nbsp; Also, it can be a really good idea to add some indexes on those fields as well.</description><pubDate>Fri, 14 Mar 2008 13:39:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14886.aspx</link><description>Edhy,&lt;br&gt;
&lt;br&gt;
Just offering some options. You never know when another trick will be needed!  :D&lt;br&gt;
&lt;br&gt;
Trent,&lt;br&gt;
I'd agree if it was anything complicated or needed data outside of the current row or in some other table or needed parameters, etc.  However, if it's just a simple manipulation of fields in the current row, then I'd lean toward the calculated field.  Like I said, I'm using a few of these and they are real easy to deal with, as they just become strongly typed fields in the BO and are always available.  Most of the time, things are more complicated and I use the other methods suggested, UDF, sproc, custom BO property...but sometimes... :D</description><pubDate>Fri, 14 Mar 2008 10:33:50 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14880.aspx</link><description>Hey Greg,&lt;P&gt;That is a good point on the DB side, but I would probably just create a UDF or stored proc to return the formatted value versus creating a table.&amp;nbsp; This way you don't have any additional overhead hitting the database each time you call the method.&amp;nbsp; If you create a UDF, the you can include it as an AS column in a SELECT query.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example UDF for SQL Server to format the address DB side&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[codesnippet]CREATE FUNCTION [dbo].[Udf_FormattedAddress] (@parentPk INT)&lt;BR&gt;RETURNS NVARCHAR&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;BEGIN&lt;BR&gt;&amp;nbsp;-- Declare the variables that will be used to build the formatted address&lt;BR&gt;&amp;nbsp;DECLARE @returnAddress NVARCHAR(1024);&lt;BR&gt;&amp;nbsp;DECLARE @address NVARCHAR(150);&lt;BR&gt;&amp;nbsp;DECLARE @city NVARCHAR(60);&lt;BR&gt;&amp;nbsp;DECLARE @state NVARCHAR(128);&lt;BR&gt;&amp;nbsp;DECLARE @postal NVARCHAR(20);&lt;/P&gt;&lt;P&gt;&amp;nbsp;-- Select the values into the&lt;BR&gt;&amp;nbsp;SELECT @address = cust_Address1, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @city = cust_city,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @state = cust_state,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @postal = cust_postal FROM Customers WHERE cust_pk = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-- Format the return value&lt;BR&gt;&amp;nbsp;SET @returnAddress = @address + CHAR(13) + @city + ', ' + @state + '&amp;nbsp; ' + @postal;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-- Return the formatted address&lt;BR&gt;&amp;nbsp;RETURN @returnAddress;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;END[/codesnippet]&lt;P&gt;&lt;STRONG&gt;Including the UDF in a query&lt;/STRONG&gt;&lt;P&gt;[codesnippet]SELECT Customers.*, dbo.FormattedAddress(Customers.cs_pk) AS cs_FullAddress FROM Customers[/codesnippet]</description><pubDate>Thu, 13 Mar 2008 23:18:23 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14879.aspx</link><description>Hi Greg,&lt;/P&gt;&lt;P&gt;Thanks a lot for your input.&amp;nbsp; &lt;/P&gt;&lt;P&gt;So far this information will not be used outside the database.&amp;nbsp; Basically this is a VFP project I am converting to .NET and of course some logic will need to be changed and this is one of those :P&lt;/P&gt;&lt;P&gt;The idea is to be able to use this information in some custom printing like an Invoice/Receipt and a label, so I don't have to be recalculating this data and yes, I agree with all of you that a Custom Field is the winner here.</description><pubDate>Thu, 13 Mar 2008 22:24:42 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14877.aspx</link><description>I would also agree to avoid storing this in the DB, unless:&lt;br&gt;
&lt;br&gt;
- You need it outside the application&lt;br&gt;
- The logic to create the value is complex and handled by the application&lt;br&gt;
&lt;br&gt;
This doesn't appear to the the case.&lt;br&gt;
&lt;br&gt;
Another option, besides storing in the db or using a custom property in the BO would be to use a calculated field in the database. This is good when you need it outside of the application, but the db can handle the logic fine (as appears in the case of building an address).&lt;br&gt;
&lt;br&gt;
[codesnippet]-- Field def in a table for calculated field&lt;br&gt;
CREATE TABLE MyTable&lt;br&gt;
(-- other fields here....&lt;br&gt;
,Street varchar (50) NULL&lt;br&gt;
,City varchar (50) NULL&lt;br&gt;
,State varchar (25) NULL&lt;br&gt;
,Zip varchar (10) NULL&lt;br&gt;
,FormattedAddress AS (Street + CHAR(13) + CHAR(10) + City + ', ' + State + ',  '  + Zip)[/codesnippet]&lt;br&gt;
&lt;br&gt;
As you can see, this is not nearly as nice as working in .NET, but if you needed outside of the application a lot (or really like T-SQL) this is good.  It also puts the data right in the BO. Just mark the field as readonly, so you don't try to update it (which will break).  I've done it both ways (using a custom property and using a calculated field in SQL) and would tend to go with the custom property in cases like this (manipulating string from exiting fields in a row). Just my $.02</description><pubDate>Thu, 13 Mar 2008 20:38:34 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14876.aspx</link><description>Peter, Trent,&lt;P&gt;I understand what you guys are saying about using a Custom Field, and I will do it that way, but this is a learning experience for me.&amp;nbsp; I am in the process of learning and getting comfortable with VB.NET in order to move on into the .NET league ;). &lt;P&gt;I tested it with a Select Case and it is working fine, thanks again for the push :hehe: &lt;P&gt;[quote][b]Trent L. Taylor (03/13/2008)[/b][hr]I am sure that you already know this, but an Or in VB.NET is BitWise and an OrElse is an explicit test.&amp;nbsp; Same is true for And...you would use AndAlso in its place.&amp;nbsp; Your code&amp;nbsp;will work in this scenario since this is an enum, but in other scenarios this may fail.&amp;nbsp; Another option is using a Select[/quote]&lt;/P&gt;&lt;P&gt;Trent and all, I am an experienced VFP developer (20+ years), but I can not say the same for .NET and my choice language VB.NET, so &lt;STRONG&gt;please &lt;/STRONG&gt;feel free to &lt;EM&gt;correct me, suggest, encourage and anything else necessary&lt;/EM&gt; to help me out in this learning process at any time.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Once again, thank you both!&lt;/EM&gt;&lt;/STRONG&gt;</description><pubDate>Thu, 13 Mar 2008 20:29:50 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14873.aspx</link><description>I tend to agree with Peters assessment of not storing it in the database.&amp;nbsp; I am sure that you have your reasons but creating a property to do the work for you when you need it would be more efficient and would normalize your data.&amp;nbsp; &lt;P&gt;I am sure that you already know this, but an Or in VB.NET is BitWise and an OrElse is an explicit test.&amp;nbsp; Same is true for And...you would use AndAlso in its place.&amp;nbsp; Your code&amp;nbsp;will work in this scenario since this is an enum, but in other scenarios this may fail.&amp;nbsp; Another option is using a Select:&lt;P&gt;[codesnippet]Select Case e.FieldChanged &lt;BR&gt;&amp;nbsp;&amp;nbsp; Case Field1, FIeld2, FIeld3, FIeld4&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Add your logic here&lt;BR&gt;End Select[/codesnippet]</description><pubDate>Thu, 13 Mar 2008 19:51:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14870.aspx</link><description>Hi Edhy,&lt;/P&gt;&lt;P&gt;You need "e.FieldChanged = " before every OR&lt;/P&gt;&lt;P&gt;That being said let me assure you that creating the address info "on-the-fly" as and when you need it is the way to go - storing it in&amp;nbsp;your database is highly redundant and inefficient.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Thu, 13 Mar 2008 19:21:17 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14867.aspx</link><description>Hi Peter, Trent,&lt;P&gt;Thanks for the suggestions, but I actually need to have this value stored in the database because it&amp;nbsp;will be use from many forms to print receipts, labels and&amp;nbsp;reports.&lt;/P&gt;&lt;P&gt;This is what I have done in the BO:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBO_FieldPropertyChanged(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldChangedEventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FieldPropertyChanged&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; e.FieldChanged = ProducerBOFieldNames.ProducerName &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.Street _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.City &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.State _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.Zip &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.Phone _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.Fax &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Or&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBOFieldNames.EmailAddress &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Format the Full Address string&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; cFullAddress &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; StringBuilder = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; StringBuilder&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ProducerName)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Street)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.City)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.State)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Zip)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" Phone "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Phone &amp;amp; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" Fax "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Fax)&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.EmailAddress)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FullAddress = cFullAddress.ToString&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;[/codesnippet]&lt;P&gt;The format of the address is working fine, but I want to limit this code to only execute for the fields included in the IF.. condition, but it is not working.&amp;nbsp; If anybody can see what I am doing wrong please let me know.&lt;P&gt;Thanks!</description><pubDate>Thu, 13 Mar 2008 17:27:26 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14862.aspx</link><description>Pete is right on the money, create a custom property that does the work for you.&amp;nbsp; You can then use this property from anywhere in your application and even bind to it.&amp;nbsp; This is how we do it ourselves.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[codesnippet]Public Readonly Property FormattedAddress As String&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Establish Locals&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim r As String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = AddressLine1 &amp;amp; COntrolChars.CrLf &amp;amp; City &amp;amp; ", " &amp;amp; State &amp;amp; "&amp;nbsp; " &amp;amp; Zip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Return formatted address&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return r&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get&lt;BR&gt;End Property[/codesnippet]&lt;/P&gt;&lt;P&gt;You can get the property attributes from another property on your bo out of the partial class.&amp;nbsp; You can also copy the Imports out of the header of the partial class for the BO as well to make some of those errors go away.&amp;nbsp; Once you do this, if you intend to bind to the property then you will need to override the GetCustomBindablePropertyDescriptors method (which you can find in the help and samples....or by doing a search out here on the forum...lots of posts :))</description><pubDate>Thu, 13 Mar 2008 16:35:33 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add event to some fields to respond to one method?</title><link>http://forum.strataframe.net/FindPost14860.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Check the topic "&lt;SPAN id=pagetitle&gt;Adding &lt;FONT style="BACKGROUND-COLOR: #3399ff" color=#ffffff&gt;Custom&lt;/FONT&gt; Field Properties" in the SF help - the example is exactly (I think) along the lines of what you are looking to do.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I presume you are not trying to concatinate these columns together and actually storing the info into another column. If you&amp;nbsp;are then&amp;nbsp;it is best that you don't&amp;nbsp;- just create the address label data on the fly as you need it, either in a custom field like the example of in a proc that returns the data for the label.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers, Peter&lt;/SPAN&gt;</description><pubDate>Thu, 13 Mar 2008 16:26:58 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item></channel></rss>