custom sql not populating grid

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Stuart
Profound User
Posts: 30
Joined: Tue Apr 17, 2012 4:37 pm
First Name: Stuart
Last Name: Leonard
Company Name: Summit Holdings
Phone: 813-665-6060
Address 1: 2310 Commerce Point Drive
City: Lakeland
State / Province: Florida
Zip / Postal Code: 33594
Country: United States
Contact:

custom sql not populating grid

Post by Stuart »

I have 6 fields in my grid (1 hidden, 5 output) I am using the custom SQL to create an SQL to substring characters from a column. The grid is not being populated. When I run showErrors(), I receive the below error message:

Run SQL Select Query ID: CPF9897 Message: Invalid Input

The SQL runs on the iSeries:
Select SUBSTRING(NTDESC,1,40) As Desc, NTREDF,NTRFCE,NTRFEM,NTSTAT,NTID From NOITRDPM

The fields in my grid are as follows:
NTID, DESC, NTREDF, NTRFCE, NTRFEM, NTSTAT
(hidden) (Output---------------------------------------)

Does ProfoundUI reference the fields by placement within the grid, or by field name?

Also, is it possible to have a field in the grid that is not a field in the database table?
Antonio
Profound User
Posts: 82
Joined: Fri Jun 29, 2012 2:33 pm
First Name: Antonio
Last Name: Ruballos
Company Name: Profound Logic
Contact:

Re: custom sql not populating grid

Post by Antonio »

Hello Stuart,

ProfoundUI does not reference the fields by placement within the grid, nor by field name. When the Custom SQL property is used, the data is simply placed on the grid. In order to access the data when using Custom SQL, you will need to use javascript (e.g grab the row and column during the onclick event and then grabbing the data in that cell). It seems that you were trying to use the Custom SQL property to populate the 6 fields on your grid, which is not currently possible on Profound UI. I believe your best bet would be to simply use the SQL statement inside of your RPG code and populate the subfile from there as well.

The error message you are getting suggests that there is something wrong with your SQL statement. You should use the STRSQL command and type into the command line your SQL statement to see more information on the problem with your SQL statement.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest