Two select Fields populating each other

Good afternoon,

I have a form with two select fields for a customer’s inventory.
One field is to look up the hardware by serial number and the other is by asset tag. Since not all of their hardware has asset tags I need these two options.
my issue seems to be that if I select the asset tag it will not populate the serial number field and vice versa.
I have tried AJAX onchange events and if the field is a text field and not a select field it works but I do need the field to be a select field.

Any pointing in the right direction would be greatly appreciated.

you have a select field that displays the serial number, you have a field that displays the inventory number,
you can create a third select field that checks if the value is greater than zero in your series field,
if it does not check if inventory is greater than zero, in a switch or an if you create your request

in on load, or on record:

$a = {$combo_a}; // combo with nsn as key;
$b = {$combo_b}; // combo whith inventory num;

if ($a> 0)
{
$search = “SELECT nsn, article_name from base_serial where nsn in ($a)”;
}
elseif ($b> 0)
{
$search = “SELECT nsn, article_name from inventory serial where ninv in ($b)”;
}
else
{
$search = ‘’;
}
sc_lookup (var, $search)
if (isset ({var [0] [0]})) {$c = {var [0] [0]};} else {$c = 0; }
$c is the value of your thrid select combo that will display your item,
good continuation