Lookup field layout as Select list, how to set it empty/null Option
-
Hi Alexa team,
I have configured a power apps form, and showing lookup fields as Select list. Issue is that there is no empty (like “Select …. “) or null option, once user selects any option then we are not able to unset/empty the lookup (select) field. Can you please suggest any fix for this?
I tried following code, first I added an empty option, and then on submit of the form Im unsetting the select fields, but not working in any case.//adding an empty option jQuery(document).ready(function ($) { $('[id="icds_dropdown_simple"]').each(function () { var newOption = $("<option>/option>").val("-1").text("– Select –"); $(this).prepend(newOption); }); }); // the was not working when I select the empty option, then I tried below to unset the select list, on click of the form submit button. $('[id="icds_dropdown_simple"]').each(function () { if( $(this).val()=="-1") { $(this).prop("selectedIndex", -1); } });
Below error is showing when I tried with empty (- Select – ) option
“responseBody”: “[object] (stdClass: {\”error\”:{\”code\”:\”0x80040265\”,\”message\”:\”{\\\”code\\\”:763010003,\\\”status\\\”:0,\\\”message\\\”:\\\”View School Lookup View not found\\\”}\”}})”
- The topic ‘Lookup field layout as Select list, how to set it empty/null Option’ is closed to new replies.