Unknown Error when using User Role to set Field value

Unknown Error when using User Role to set Field value

I have a form with a "Location" field that should be preset if the Role of the user filling in the form is "Storekeeper".

I therefore have the following 'Created or Edited' -> 'Load of the Form' workflow:
  1. if(thisapp.portal.isUserInProfile("Storekeeper"))
  2. {
  3. input.Location = "London";
  4. disable Location;
  5. }
However, whenever a user with the Storekeeper role tries to open the form, they get the following error:



Can anyone tell me what is causing the error?