# Conditional Pop-Up Menus

**URL:** <https://the.fmsoup.org/t/conditional-pop-up-menus/2099>\
**Category:** Questions\
**Tags:** student-case-use, active-status, primary-key, name-display\
**Created:** [May 10, 2021, 5:05pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099 "2021-05-10T17:05:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonMark](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@JasonMark](https://the.fmsoup.org/u/JasonMark)\
**Post date:** [May 10, 2021, 5:05pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/1 "2021-05-10T17:05:25Z")

</div>

I have a number of pop-up menus with a transparent background which show "active" students, but is really joined on their Primary Key.

The problem, is when a student becomes "inactive" they disappear from the list and they show up as their primary key instead of their name.

I don't want the staff to have to sub through 2,000 students, to find the 200 active ones, but I do want the names to show up.

I originally just stacked two menus on top of one another. The top one was a pop-up menu that was NOT editable in browse mode which shows ALL students, and the one below it was editable in browse mode, but only has ACTIVE students... but I started to have todo a whole bunch of conditional formatting to get the colors to match up with the alternating row state and the active row state of the portal. Is there a better way to do this?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/e/e31de00e574dad3d2e3de05bed0240cc525590b1.png)

---

<div class="post-metadata">

**Author:** ![rivet](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/rivet/32/1727_2.png) [@rivet](https://the.fmsoup.org/u/rivet)\
**Post date:** [May 10, 2021, 5:32pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/2 "2021-05-10T17:32:58Z")

</div>

I have two configurations of the same field, set up to appear as a single field.

![popup-layout](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/d930715909d7fb3d6071cec586ee2845214e5828.png)

**The left side:**  
-popup menu  
-value list: all records  
-field entry off

**Right Side**  
-popup menu [include arrow]  
-value list: all active records  
-adjust field width to only show the arrow  
-field entry: on

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [May 10, 2021, 11:07pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/3 "2021-05-10T23:07:23Z")

</div>

Another option is to remove the data inputs from the layout and only display the related data field.

I'm using card windows for data modification - especially in list mode. There are a lot of benefits, including the fact that they can be re-used from many different contexts.

---

<div class="post-metadata">

**Author:** ![Keywords](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@Keywords](https://the.fmsoup.org/u/Keywords)\
**Post date:** [May 11, 2021, 10:33am UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/4 "2021-05-11T10:33:25Z")

</div>

I would consider the following option:

1. Add a merge field text object to display the student name (or a text box) over the top of the ID field
2. Set this object to Hide if the student is Active  
NOTE: the object will need to have a background fill the same colour as the layout background in order to mask the student ID below it. Alternatively, you could consider setting the ID field to Hide when student is Inactive.

---

<div class="post-metadata">

**Author:** ![PSI](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@PSI](https://the.fmsoup.org/u/PSI)\
**Post date:** [May 11, 2021, 6:56pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/5 "2021-05-11T18:56:19Z")

</div>

To me this was an old workaround. Think in the reverse. Select the Name and lookup the ID. I use ExecuteSQL() to get the ID.

---

<div class="post-metadata">

**Author:** ![planteg](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/planteg/32/627_2.png) [@planteg](https://the.fmsoup.org/u/planteg)\
**Post date:** [May 11, 2021, 7:34pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/6 "2021-05-11T19:34:24Z")

</div>

Hi @PSI ,

welcome to Thesoup ! I hope you will enjoy our forum.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [May 11, 2021, 9:42pm UTC](https://the.fmsoup.org/t/conditional-pop-up-menus/2099/7 "2021-05-11T21:42:10Z")

</div>

@psi, good to see you here.

I've used this solution too but gave up on it. I've had to undo a few messes that were caused by "name collisions."
