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 ebryant
#824205
I'm having issues when trying to populate a field based on the selection within a dropdown. I'm using the following SQL:

SELECT N.DEPTID, O.SUPNAME
FROM PMT_DEPT_SUPER O
JOIN PMT_DEPARTMENTS N
ON O.DEPTID = N.DEPT_ID
WHERE N.DEPARTMENT = @@DeptID

Can a dropdown be used for this purpose? Or is there a way to suggest a value when a user is typing in a field?

Thanks
User avatar
By rogerdeku
#824211
Hi ebryant geek

I would recommend you

1 Review your SQL Syntaxis
2 Check "Populate a Dropdown with a Database Query"
https://wiki.processmaker.com/index.php ... 24_DBArray and
https://wiki.processmaker.com/3.0/Dropdown_Control

Depending your Process Workflow such dynaform design you have. uggek
A dropdown will be use in this case, other way. I would suggest you.

A dropdown alternative could be an autocomplete field. 8)
https://wiki.processmaker.com/3.2/Suggest_Control
User avatar
By amosbatto
#824217
ebryant wrote: Wed May 01, 2019 3:34 pmI'm having issues when trying to populate a field based on the selection within a dropdown. I'm using the following SQL:

SELECT N.DEPTID, O.SUPNAME
FROM PMT_DEPT_SUPER O
JOIN PMT_DEPARTMENTS N
ON O.DEPTID = N.DEPT_ID
WHERE N.DEPARTMENT = @@DeptID

Can a dropdown be used for this purpose? Or is there a way to suggest a value when a user is typing in a field?
You can use a text field as a dependent field and a dropdown as an independent field, so your query should work as long as you spelled everything correctly, but you probably want to use a suggest box instead of a text field (as rogerdeku recommends).

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]