• Resolved siddiquemahsud

    (@siddiquemahsud)


    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\\\”}\”}})”

Viewing 1 replies (of 1 total)
  • Plugin Author alexacrm

    (@alexacrm)

    Hi @siddiquemahsud

    is this column business required? It needs to be optional for the blank value to appear. If you’d like to control the appearance yourself then the value needs to be blank, not -1.

Viewing 1 replies (of 1 total)
  • The topic ‘Lookup field layout as Select list, how to set it empty/null Option’ is closed to new replies.