﻿<?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?)  » Unit Conversions</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:17:42 GMT</lastBuildDate><ttl>20</ttl><item><title>Unit Conversions</title><link>http://forum.strataframe.net/FindPost17284.aspx</link><description>Good day, all!&lt;/P&gt;&lt;P&gt;I have wrestled with unit conversions my entire life (e.g. 1 Lego set = ??? Lego pieces, etc.).&amp;nbsp; Now, I have been wrestling with the best way to handle these conversion within the SF framework.&amp;nbsp; Would the BO be the best place to do this?&amp;nbsp; My real world example is this:&amp;nbsp; a salesperson enters a sales order for a part.&amp;nbsp; The part is sold in meters; however, we are a non-metric manufacturing plant and must have everything in English standard units.&amp;nbsp; So, a conversion must occur between the sales order and the work order for the production plant to make this part.&amp;nbsp; The actual conversion is a piece of cake, but where would I put this thing?&amp;nbsp; In the DB (done that)?&amp;nbsp; In the BO (considering that)?&amp;nbsp; Elsewhere (huh?)?&amp;nbsp; The issue starts to become one of complexity.&amp;nbsp; Once the number is calculated, then it is used in a lot of other places (reports, time-to-complete calculations, inventory levels, etc.).&lt;/P&gt;&lt;P&gt;Can anyone provide a tad bit of direction on this issue?&amp;nbsp; Perhaps an overview of how you handle conversions?&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR&gt;Bill</description><pubDate>Tue, 24 Jun 2008 09:39:55 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Unit Conversions</title><link>http://forum.strataframe.net/FindPost17287.aspx</link><description>[quote]Can anyone provide a tad bit of direction on this issue?&amp;nbsp; Perhaps an overview of how you handle conversions?[/quote]&lt;/P&gt;&lt;P&gt;The first thing that I would do is create a centralized shared class that accepts virtually any type of data that may need to be converted.&amp;nbsp; This would be a shared class, so it would not need to be instantiated and would always be accessible.&lt;/P&gt;&lt;P&gt;[codesnippet]Public NotInheritable Class MyConversions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Function ConvertMeterToFeet(ByVal meters As Integer) As Single&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Do some conversion stuff here&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;/P&gt;&lt;P&gt;End Class[/codesnippet]&lt;/P&gt;&lt;P&gt;You could then access this directly from within a BO if you had the need.&amp;nbsp; So the first order of business would be to create your class that will be reusable and then access those shared methods within the BO when a conversion needs to take place.</description><pubDate>Tue, 24 Jun 2008 09:39:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>