Dynamically preload a field based on previous answers

Dear ODK community,

Currently I'm working on a project in Ghana where we will be doing the registration of about 1500 so called 'Business Operating Permits'. Working out this form made me realize that it would be helpfull if it would be possible to 'dynamically preload' a field based on previous answers. I will try to give some context in order to make the issue as clear as possible.

Upon approaching a respondent in a business we are trying to register we aks for the name of this person. Next we ask if this person is the owner of the business or an employee. If the respondent is an employee we ask for the name of the owner of the business.

The situtiation in Ghana is that businesses do not always have an 'official' business name. In many cases a person selling a local dish on the side of the road operates a business but his business has no name. In such cases the name of the person is simply being used as the business name.

This leads to the situation that in the results file the business name can be in three different columns:

  1. There is no official business name and the respondent is the owner (business name = respondent first name + respondent last name)
  2. There is no official business name and the respondent is an employee (business name = owner first name + owner last name)
  3. There is an official business name (business name = business name)

When uploading the data in our business registration system it is possible to keep the above into account and make sure that the business name gets assigned correctly. However it woud be highly preferable if some kind of mechanism could be build into the form ensuring that the correct business name is always placed in the same column.

I'm hoping that someone has a solution to this and is willing to point me in the right direction. If there is no (easy) solution to this that is also fine but good to know. To give you some more insights I have attached the form to this post.CCMA_BOP_v01.xlsx (82.2 KB)

Thanks in advance!

Kind regards,

Niels

Try this:

business.xls (19.5 KB)

Basically, it will preload a value into the business name ("firstname_lastname") as soon as the first name and last name questions are answered (both are mandatory), but it will then allow you to overwrite this default with the actual business name if desired.

1 Like