Long Field Names in Grid Data Properties Window

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Long Field Names in Grid Data Properties Window

Post by RichDotsonMTD »

Is there a way to use the long field names when linking a database to a widget? I have the "Enable Long Field Names through Aliases" option selected in the designer but that seems to only affect individual fields on the UI. When I prompt the "database fields" property the field selection window shows the short names or creates a 10 character field name if the field in the DB is longer than 10 characters.
.
.
Attachments
PUIDB.png
PUIDB.png (35.51 KiB) Viewed 1767 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Long Field Names in Grid Data Properties Window

Post by Scott Klement »

To be clear: There are two different (unrelated) things referenced in this post:
  1. Variables for in RPG/DDS "field binding" via the "Enable Long Field Names through Aliases" option
  2. SQL database column names for a database-driven widget (the "database fields" property)
Please be careful to understand that these are different things.

That said, if your database has both longer and shorter field column names, you should be able to use the longer ones simply by typing them into the "database fields" property in place of the shorter ones. The "prompt window" for selecting fields may not show them, but that shouldn't matter. For database fields, all it is doing is building a SELECT statement, like:

Code: Select all

SELECT [database fields property] FROM [database file property]
So as long as the field names you type in the property would be valid in a SELECT statement, they should work fine.
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Re: Long Field Names in Grid Data Properties Window

Post by RichDotsonMTD »

I figured they were separate things based on the results I was seeing but wanted to verify that. I was hoping there was a setting that I was missing that would allow me to "toggle" between the short and long SQL column names like the "Enable Long Field Names through Aliases" does for the RPG/DDS variables.

Because of my horrendous typing skills I was trying to avoid typing each long column name into the "database fields" property. I've resorted to typing the column names into a Notepad++ document and then copy/pasting that string into the PUI designer. Not the most efficient process but much better than typing them into the small "database fields" property.

Thanks for the info. Your quick response is always appreciated.
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Re: Long Field Names in Grid Data Properties Window

Post by RichDotsonMTD »

I tried keying the long SQL column name into the "database fields" property but when I ran the program nothing was loaded into the grid. When I used the short DB names the grid loaded as expected.
.
.
Attachments
PUIDB.png
PUIDB.png (61.75 KiB) Viewed 1758 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Long Field Names in Grid Data Properties Window

Post by Scott Klement »

This may be a bug in the new "load fields into widgets" property -- which is the new feature that lets you use field binding together with a database-driven grids. (I'm assuming you don't have this problem when this property is turned off.)

When this feature is off, it does not require anything to be bound to widgets, the data is loaded directly into the grid itself, and since there's no binding, this should be a non-issue.

I'll ask the developer who wrote that feature to confirm.
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Re: Long Field Names in Grid Data Properties Window

Post by RichDotsonMTD »

You are correct. It works correctly if I turn off the "load fields into widgets" property.

I was able to get it to work correctly with the "load fields into widgets" property set to "true" by going into the source view and changing the "fieldName" from "RECENT0001" to "RecentOrder" which is the SQL long column name.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Long Field Names in Grid Data Properties Window

Post by Scott Klement »

Good to know. That being the case, its definitely a bug, and should be reported to Profound Logic by e-mailing support@profoundlogic.com

I can let them know.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest