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.
.
.
Long Field Names in Grid Data Properties Window
-
- 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
- Attachments
-
- PUIDB.png (35.51 KiB) Viewed 1746 times
-
- 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
To be clear: There are two different (unrelated) things referenced in this post:
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:
So as long as the field names you type in the property would be valid in a SELECT statement, they should work fine.
- Variables for in RPG/DDS "field binding" via the "Enable Long Field Names through Aliases" option
- SQL database column names for a database-driven widget (the "database fields" property)
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]
-
- 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
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.
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.
-
- 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
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 (61.75 KiB) Viewed 1737 times
-
- 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
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.
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.
-
- 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
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.
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.
-
- 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
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.
I can let them know.
Who is online
Users browsing this forum: No registered users and 0 guests