Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Field name 'Label' property request
Thu, Oct 30 2014 9:03 AMPermanent Link

Trinione

Can a 'Label' property be added to a Field name?

This would greatly assist in the building of forms as this property can by used after it is accessed via the information.schema.
Thu, Oct 30 2014 9:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Trinione

>Can a 'Label' property be added to a Field name?
>
>This would greatly assist in the building of forms as this property can by used after it is accessed via the information.schema.
>

I'm guessing just what you want here but have you seen Description when you add a field to a table? That could easily be used.

Also look at SELECT * FROM Information.TableColumns

Roy Lambert
Thu, Oct 30 2014 12:06 PMPermanent Link

Trinione

Sorry, I meant Information.TableColumns.

I am currently using the 'Description' property to hold the labels. However, I think an explicit 'Label' property would be more appropriate and save time since if there is an actual description it would require more coding and be inefficient and error prone.




Roy Lambert wrote:

Trinione

>Can a 'Label' property be added to a Field name?
>
>This would greatly assist in the building of forms as this property can by used after it is accessed via the information.schema.
>

I'm guessing just what you want here but have you seen Description when you add a field to a table? That could easily be used.

Also look at SELECT * FROM Information.TableColumns

Roy Lambert
Thu, Oct 30 2014 5:48 PMPermanent Link

Adam Brett

Orixa Systems

Trinione

>>I think an explicit 'Label' property would be more appropriate and save time

I am not against this.

I tend to just use the FieldName itself for my labels, and if I need to add extra char on the front (i.e. underscore) to indicate if the field has a special use or is hidden from the GUI. I guess a "Label" property would improve things, and not be hard to add.

You might consider adding a meta-table "GUILabels" or "TableLabels" with TableName, FieldName, Label fields. I only suggest this as it would make the db more flexible for multi-language application, as different languages could have different versions of this table.
Fri, Oct 31 2014 5:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Trinione

>I am currently using the 'Description' property to hold the labels. However, I think an explicit 'Label' property would be more appropriate and save time since if there is an actual description it would require more coding and be inefficient and error prone.

I would advocate against any such addition. I don't think it would provide any real benefit to the majority of users and would give the possibility of confusion as to which column was actually used. There's also the matter of the type that would be used, if VARCHAR or CHAR then how long and what happens if you need multi-line labels then you're into a CLOB column or you have to have special characters or combinations (eg /n) to indicate a new line.

If I was wanting to auto build forms from the database I'd go along with Adam's suggestion and have my own table with a fieldname to label conversion.

Roy Lambert
Wed, Nov 5 2014 4:54 PMPermanent Link

Trinione

What I settled on is using the Description field with the first area being the Label. So, I just put 'Last Name; This is the  last name of the user'.

That way, I just check for all characters before the first semi-colon. Simple. And it works fine.
Image