Relevant formula using ${username}

I want to restrict certain questions to certain users - they are rows in a Matrix. By guesswork I added a relevant column to the survey sheet in my XLSForms file, and put in formulas like this:

${username} = ‘mikehoneymf’

This seems to work, e.g. when I open the form (in another browser) and sign in as that user, I can see the entries for that user, otherwise they don’t appear. I have a list of about 140 questions that I need to filter by 4 users, so it seems manageable in XLSForms.

This leads me to 2 questions:

  1. Is this the best way to achieve this functionality?
  2. When I open the form in my default browser (same one I’m using to edit the form), it never asks me to sign in?

Hi @mikehoneymf,

Yes. Maybe you could also do it by pre-coding as shown in the discussion that has happened earlier (on how to skip questions):

Sorry could not understand the issue. Could you kindly explain a bit?

GOOD DAY!

Hi Kal,
Thanks for confirming on #1.

On #2, I’m using Chrome to edit my form. When I hit the Open Form button, it does open in another Chrome tab. But I dont get asked to sign in, yet from the result on the page I can see that I’m not signed in as my username mikehoneymf?

I tried putting a note with a label of ${username} and it showed: username not found.

This is not a major issue - I found I could open the survey in another browser and it would prompt me to log in, after that it recognised my username. It just seems odd.

Thanks
BTW Kobo is awesome - really enjoying it so far!

1 Like

Hi @mikehoneymf,

If you wish to get asked for a sign in, you should first copy the link (and paste it somewhere else so that you do not forget the link to your survey) and then sign-out from your account.

Once you are signed out from your KoBoToolbox account try entering the survey form by pressing the link you pasted it safely. You should be asked to sign in.

GOOD DAY!

Hi @mikehoneymf
In addition to what @Kal_Lam has just mentioned, I would like to recommend that you consider looking at the discussions here