﻿<?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 » WinForms (How do I?)  » User Defined Field</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 16:03:27 GMT</lastBuildDate><ttl>20</ttl><item><title>User Defined Field</title><link>http://forum.strataframe.net/FindPost31283.aspx</link><description>&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; font-size: 7pt"&gt;&lt;font size=3&gt;We are looking at giving our clients the ability to create &lt;strong&gt;&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'; BACKGROUND: #f8ff40"&gt;User&lt;/span&gt;&lt;/strong&gt; &lt;strong&gt;&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'; BACKGROUND: #f8ff40"&gt;Defined&lt;/span&gt;&lt;/strong&gt; &lt;strong&gt;&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'; BACKGROUND: #f8ff40"&gt;Field&lt;/span&gt;&lt;/strong&gt;&lt;span class=shl&gt;&lt;span style="BACKGROUND: white"&gt; in our application. Is there any sample/guidance that I could obtain from StrataFrame community?&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class=shl&gt;D&amp;nbsp;&lt;/span&gt;</description><pubDate>Mon, 20 Aug 2012 14:01:09 GMT</pubDate><dc:creator>Danny Doobay</dc:creator></item><item><title>RE: User Defined Field</title><link>http://forum.strataframe.net/FindPost31396.aspx</link><description>Tks for all your suggestion. I will try the&amp;nbsp;&lt;span style="font-family: Verdana, Tahoma, Arial; font-size: 13px; line-height: 21.33333396911621px; background-color: rgb(249, 250, 252); "&gt;PIVOT&lt;/span&gt;&amp;nbsp;option.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;D</description><pubDate>Mon, 20 Aug 2012 14:01:09 GMT</pubDate><dc:creator>Danny Doobay</dc:creator></item><item><title>RE: User Defined Field</title><link>http://forum.strataframe.net/FindPost31288.aspx</link><description>Yes it&amp;nbsp;definitely&amp;nbsp;adds a layer of complexity, but the business requirement was "unlimited flexibility, no need to change the code/database down the road"&lt;br/&gt;&lt;br/&gt;&lt;div&gt;If you don't need that, add the static fields :)</description><pubDate>Fri, 20 Jul 2012 12:21:50 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: User Defined Field</title><link>http://forum.strataframe.net/FindPost31285.aspx</link><description>&lt;font color=#000000 size=3 face=Calibri&gt;I have an application that requires user defined fields.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In the original version I used the method suggested by Keith of stacking them vertically one field per row and pivoting later. This seemed to be the best solution as it had the advantage of not requiring a database change to increase the number of user defined fields. What I found was there was a lot of work in managing these fields both at the business object level and the UI. &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000000 size=3 face=Calibri&gt;In the end I found that in practical use the number of user defined fields never exceeded 10 so in version 2.0 &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;I switched to just allocating 10 user defined fields in my main table along with adding 10 fields to the UI where I can hide the unused fields through a combination of visibility and form resizing. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;All of the fields are stored as string and I&amp;nbsp;control what the user can enter into the field by creating a field definition record for each user defined field that holds an input mask, RegEx string, base data type, and other information to allow enforcement of business rules and conversion to other data types&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000000 size=3 face=Calibri&gt;As Keith said it really depends on what your needs are. The ‘stacking’ solution is more elegant and allows greater flexibility but the pre-allocated method is far easier to implement.&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000000 size=3 face=Calibri&gt;-Larry&lt;/font&gt;</description><pubDate>Thu, 19 Jul 2012 23:31:23 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: User Defined Field</title><link>http://forum.strataframe.net/FindPost31284.aspx</link><description>Most database I have seen will either tack on X number of fields to a table (user 1, user1, etc)&amp;nbsp;or have a child table with the same, this is the easiest method you will find in my opinion.&lt;br/&gt;&lt;br/&gt;The downside is that you are limiting yourself and have to pick a number of fields and live with them, adding more down the road requires modifications to the database.&lt;br/&gt;&lt;br/&gt;We recently took a different approach and implemented a solution where the user defined fields are stored in a table vertically (one row per field) and then pivoted with the TSQL PIVOT command into place. This allows an unlimted number of user defined fields with no modifications to the database later. The&amp;nbsp;controls that display these user fields are generated dynamically on our forms in a flow layout panel.&lt;br/&gt;&lt;br/&gt;We also tried storing the user fields in an XML&amp;nbsp;column but had problems with performance with hundreds of thousands of records, if you volume is low it might be a good alternative.&lt;br/&gt;&lt;br/&gt;It really depends on your needs and hopefully this gives some food for thought.&lt;br/&gt;&lt;br/&gt;There are a lot of good topic on the net about this topic, it will in the end really boil down to your needs, there is in my opinion no one single absolutely right answer.&lt;br/&gt;&lt;br/&gt;I would stay away from dynamically altering your table structures, you will find that suggestion out there and I think it is the only one I would not seriously consider.&lt;br/&gt;&lt;br/&gt;Good luck!</description><pubDate>Thu, 19 Jul 2012 17:48:08 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item></channel></rss>