Default to logged-in user in drop down

 

I have a drop down (connection) that allows the user select a user  to assign an expense to

 

Most of the time they will be assigning to themselves and would be great if I could get the drop down to default to the name of the logged-in user as would make data entry much more efficient

 

tks

Noel

1 Like

Any recommendations on how I might debug issue ? tks Noel

I have tried a lot of variations of this

I added a title tag temporarily that I click on to make this kick off.

The alert works when I click on Title and shows record ID but it does not set the drop down ....... any idea appreciated tks 

$(document).on('knack-view-render.view_610', function (event, view, data) {

     $("#kn-input-section-1605202366772").click(function () {
          current_user = Knack.getUserAttributes().id;
          alert(current_user); // debug: just test what its picking up
          $('#view_610-field_246').val(current_user);
        $('#view_610-field_246').trigger("liszt:updated");
     });
});