AnsweredAssumed Answered

Conditional Value List using pop-up menu in portal

Question asked by jdevans on Oct 14, 2015
Latest reply on Oct 21, 2015 by jdevans

I have the need of creating a CVL from a field in a portal. What I have to work with so far:


1) Accounts table which includes account_id_pk, and a field to specify whether or not this account is "Active" (aka useable) active_status and holds value of either Yes or No.


2) Travel Requests table which includes trav_req_id_pk, and other detail fields.


3) TravReq_Accts_line_items JOIN table which includes:

fk_account_id, fk_trav_request_id, active_accounts_constant_yes. In this table, TravReq_Accts_line_items::fk_account_id is related to = Accounts::account_id_pk, and TravReq_Accts_line_items::fk_trav_request_id is related to = Travel Requests::trav_req_id_pk. And lastly, active_accounts_constant_yes holds an auto-generated value of Yes for all records created. This table is to hold all the Account line items that belong to a given Travel Request record.


4) I created a second table occurrence of Accounts called Accounts_Active. I set its relationship to TravReq_Accts_line_items such that Accounts_Active::account_status = TravReq_Accts_line_items::active_accounts_constant_yes

The Layout Im working on is based on the Travel_Requests (2) table. On it, I have a portal set up so that on a Travel Request record, one or many Accounts can be entered. The portal is based on TravReq_Accts_line_items (3). The field placed on it that is to be used as a pop-up menu is fk_account_id. The active_status field from Accounts isn't on this layout, and shouldn't be. I only want the user to see active_status=Yes accounts show up in that pop-up menu. I haven't found any way of doing this successfully. Every example I've seen shows a series of dropdown/pop-up menu fields such that the second set of choices is based on the first choice, and so forth.

My use case is that the field that should determine what my drop-down/pop-up displays is on another layout. They are related though.

In my search for an answer, I've had the pop-up respond by showing ALL accounts, even if they were statused as active_status=No, or "<no values defined>", or by showing a single value, which I couldn't determine why exactly it was the one showing.