Page 1 of 1

Return all user_UID's

Posted: Tue May 21, 2019 3:07 am
by avanzyl
I created a process to simply record my queries to a processmaker table. In the process I have one dynaform with two questions. The first question is a dropdown box to query all the user UID's. I would then select a user UID and the next question queries the user email based on the UID selected. The SQL query for question 1 is given below:

SELECT USR_UID FROM USERS ORDER BY USR_UID DESC

The query for the second question is given below:

SELECT USR_UID, USR_EMAIL FROM USERS WHERE USR_UID = @@user_uid ORDER BY USR_EMAIL ASC


My Problem is that the first query doesnt return any results. Any assistance would be great.

Re: Return all user_UID's

Posted: Tue May 21, 2019 5:19 am
by danielwalters
Hey.

I have some feeling that you always have to select both the ID, and then the field you want, so
Code: Select all
SELECT USR_UID FROM USERS ORDER BY USR_UID DESC
becomes
Code: Select all
SELECT USR_UID, USR_UID FROM USERS ORDER BY USR_UID DESC
if you want a dropdown of UID's

Give this a go.

Cheers,
Daniel

Re: Return all user_UID's

Posted: Tue May 21, 2019 6:12 am
by avanzyl
danielwalters wrote: Tue May 21, 2019 5:19 am Hey.

I have some feeling that you always have to select both the ID, and then the field you want, so
Code: Select all
SELECT USR_UID FROM USERS ORDER BY USR_UID DESC
becomes
Code: Select all
SELECT USR_UID, USR_UID FROM USERS ORDER BY USR_UID DESC
if you want a dropdown of UID's

Give this a go.

Cheers,
Daniel
Thanks Daniel for the help.