How to add event to some fields to respond to one method?


Author
Message
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 All,

I have a form with some fields including address fields.  There is one field FormattedAddress which I have to update with some fields concatenated for an address label.

What would be the best way to address this kind of situation?

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.  Just wondering if I am in the correct place or there is any other way to do this?

Thanks!

Edhy Rijo

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



Just offering some options. You never know when another trick will be needed! BigGrin



Trent,

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... BigGrin
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
All good advice, Greg.  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.  So we are bit more leary of calculated fields (in this manner), especially when dealing with character data, than we once were.  But we will still do this under certain conditions.  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.  Also, you can test this against your database and see where you get the best performance.  Use the SET STATISTICS commands to see what query performance difference you get:

SET STATISTICS PROFILE ON
SET STATISTICS TIME ON

That would be the TRUE test on your data.  Also, it can be a really good idea to add some indexes on those fields as well.

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
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 BigGrin
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
LOL....thanks, Greg!  I always truly appreciate your contributions out here!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Edhy Rijo - 17 Years Ago
Peter Jones - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Edhy Rijo - 17 Years Ago
Peter Jones - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Edhy Rijo - 17 Years Ago
Greg McGuffey - 17 Years Ago
Edhy Rijo - 17 Years Ago
Trent L. Taylor - 17 Years Ago
                         Edhy,

Just offering some options. You never know when...
Greg McGuffey - 17 Years Ago
                             All good advice, Greg. I will warn you, though, that the larger your...
Trent L. Taylor - 17 Years Ago
                                 Hmmmm...good info Trent. The tables I'm using this on are small and...
Greg McGuffey - 17 Years Ago
                                     LOL....thanks, Greg! I always truly appreciate your contributions out...
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search