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.
By manalidhuri
#827635
I have two dropdown fields in grid department and product, i want mapping between those two fields.
That is when user select any option from dept dropdown the products which comes under that selected dept will remain in product dropdown.

I have tried two queries
For department dropdown
select ID,DEPARTMENTfrom PMT_DEPARTMENT_PRODUCT;

and for product
select ID,PRODUCT FROM PMT_DEPARTMENT_PRODUCT WHERE DEPARTMENT IN
(SELECT DEPARTMENT FROM PMT_DEPARTMENT_PRODUCT WHERE DEPARTMENT=@@Department);

Note:(@@Department is the variable of department dropdown)
but this is not working for grid control(i.e for the dropdown which are in grid control)

so is there any another solution for this?
User avatar
By programerboy
#827643
Hi,
According to your queries, them must be like this:
Code: Select all
first query:
select DEPARTMENT as id, DEPARTMENT as name from PMT_DEPARTMENT_PRODUCT;

second query:
select ID,PRODUCT FROM PMT_DEPARTMENT_PRODUCT WHERE DEPARTMENT = @@Department
https://pmlearning.info
Thanks
Last edited by programerboy on Tue Apr 06, 2021 5:54 am, edited 1 time in total.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]