简体   繁体   中英

Drop down source issues for Apex Form

I have a table I created to use as the source for the of dropdowns of a form. The goal is to have only what possible options are available for the Department code based on who the owner is. I got the scrap owner to display correctly but unfortunately I have not been able for the department code to show up. No options are able to pop up. This is what my code looks like:

    Select DEPT_CODE, DEPT_CODE as Value From Degrade_Robots
    WHERE SO_NAME = :P7_SCRAP_OWNER

    group by DEPT_CODE

    order by DEPT_CODE

My table is set up like: 在此处输入图像描述

You aren't aggregating anything; don't use group by but distinct .

select distinct
       dept_code as display_value,
       dept_code as return_value
from degrade_robots
where so_name = :P7_SCRAP_OWNER
order by dept_code;

As you don't see anything in the list, I presume that's because you forgot to mention P7_SCRAP_OWNER item in Select List's LoV Parent Item(s) property.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM