Only Allow One Selection From Two Data Blaze Tables

Need help with multiple Data Blaze menus pulling from the same table.

Use case: All my users will see the first DB menu, but only a small group of users will see the 2nd DB menu in addition to the first one. If an option is selected from 1 menu, I want the other menu to be forced to a specific row....Row 1. This row has "-" as the value in every cell.
So ultimately, a user can only make a selection from one menu or the other.

Select the program this student wishes to change to:

This list contains ONLY programs available 2/05/2024 and out.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "2/05/2024 and out"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=program_selector}

If you need to select an older program, use this list.

This list contains ONLY programs available BEFORE 2/05/2024.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "Up to and including 1/08/2024"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=program_selector}

Selected Program Name: {=program_selector["program name"]}
Selected Program Code: {=program_selector["program code"]}

Rather than forcing the second menu to a specific value, would it make sense to wrap it with an {if} condition and hide it when a value in the first menu is selected?

I tried something like that but it did not work as hoped. I'll try another approach to the if conditions idea.

Let me know if you have trouble with it. I think it's probably the way to go here.

While it is not the solution the way I was hoping it to be, the {if} condition does work as you suggested and gets us closer.

Select the program this student wishes to change to:

This list contains ONLY programs available 2/05/2024 and out.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "2/05/2024 and out"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=program_selector}

If you need to select an older program, use this list.

This list contains ONLY programs available BEFORE 2/05/2024.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "Up to and including 1/08/2024"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=program_selector}

Selected Program Name: {=program_selector["program name"]}
Selected Program Code: {=program_selector["program code"]}

I've used the old approach for selecting from 2 formmenus with 1 output. The only problem here is that dbselect as a formmenu can't be updated using variable value change. Therefore I've added additional text to show selected dropdown. This can be further improved it seems - one idea is to load all data from tables into a list and then use it in plain formmenu, that way it should be possible to make formmenus actually reset to "-" state using the old approach.

Select the program this student wishes to change to:

{empty=["program name": "-", "program code": "-", "start dates": "-"]}
{selector=empty}

This list contains ONLY programs available 2/05/2024 and out.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "2/05/2024 and out"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=new_program_selector} {if: selector == new_program_selector and selector <> empty}(You selected this option){endif}

If you need to select an older program, use this list.

This list contains ONLY programs available BEFORE 2/05/2024.
{dbselect: SELECT `program name`, `program code`, `start dates`
FROM Program_Data
WHERE `Start Dates` = "Up to and including 1/08/2024"
OR `program name` = "-"
ORDER BY `program name`
ASC; space=id; menu=yes; cols=50; name=old_program_selector}{if: selector == old_program_selector and selector <> empty}(You selected this option){endif}

{if: new_program_selector <> empty and old_program_selector <> empty}
{if: selector == new_program_selector}
{new_program_selector=empty}
{selector=old_program_selector}
{endif}

{if: selector == old_program_selector}
{old_program_selector=empty}
{selector=new_program_selector}
{endif}
{elseif: new_program_selector <> empty}
{selector=new_program_selector}
{elseif: old_program_selector <> empty}
{selector=old_program_selector}
{endif}

Selected Program Name: {=selector["program name"]}
Selected Program Code: {=selector["program code"]}

Yeah my previous solution was the regular formmenu. It worked fine but the DB menu is far superior in so many ways…mostly the ability to type filter in real-time.