Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By groakes
#815511
Hi folks,

I have a grid with a dropdown (NAME) that is populated by an SQL query:
Code: Select all
SELECT CONCAT(USR_FIRSTNAME, " ", USR_LASTNAME) FROM wf_workflow.USERS Where DEP_UID = '8970054995a89126a8bf528061647524'
This query should return 4 users.

When I open the form the dropdown is blank, but on clicking the control it opens a blank selection panel four rows deep. I can select a blank option. I have a SAVE DRAFT function built into a button on the form. When I reopen the form with debug on, it shows the value written into the appropriate location in the array, but the form itself does not display the value.

The contents of the grid are written to a Report Table. When I look at the data a correct value has been written into the table.

If I apply the same SQL query to a textbox control and it displays the first result correctly.

I have tried this with other queries to ther grid dropdowns and the results (or lack there of) are consistent. Are there any reasons that the grid dropdown doesn't display the values?

I am running 3.2.1 Community

thanks in advance
Greg
User avatar
By amosbatto
#815522
For dropdown field, the query needs to return two fields for the value and the label in the option list.

Either do this:
SELECT USR_UID, CONCAT(USR_FIRSTNAME, " ", USR_LASTNAME) FROM wf_workflow.USERS Where DEP_UID = '8970054995a89126a8bf528061647524'

or this:
SELECT CONCAT(USR_FIRSTNAME, " ", USR_LASTNAME), CONCAT(USR_FIRSTNAME, " ", USR_LASTNAME) FROM wf_workflow.USERS Where DEP_UID = '8970054995a89126a8bf528061647524'

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]