Form design logic questions

Dear Audipas,

I am very thankful and grateful to you for your continuous support and guidance.

I have some more new query.

  1. position(..) - what does this command means what kind of output we have got from this command.

  2. Let suppose I have huge ID part like State-District-Teshil-Village-PSU No. (I am attached ID part file for your reference).

If Investigator/Operator did not enter data according to ID part which I have mentioned in the external file then it will show an Error message like - "Wrong ID part you have enter, please check and reenter" and it not allow to operator/Field Investigator to go forward in questionnaire entry.

I have mentioned the check-in "O Column" in ID excel file. I want that kind of check for ID file.
How to call the external file and where do you write command for call external file.

  1. If Q103 (Sex) =3 and Q104=5 Means If Q103(Sex Code=3 than Q104 code should be 7. No other code will be taken. Error Message - "If Q103 code is 3 then Q104 (Marital Status) should not other than 7 (Not applicable).

  2. I have marked my last query in yellow colour in xlsx form Q210. Please check that the command I have written is correct or not.

I have attached xlsx and ID part excel sheet for your reference.

Thanks & regards,

Anil
Anil-Sample09-export.xlsx (19.4 KB) Test_ID_Part.xlsx (14.4 KB)

position give you the the line number or repeat number for the iteration of the questions (e.g first you enter the Head then position(..)= 1, then you enter the second member of the household and position(..)=2 etc etc...)

The best things in my opinion is to have a cascading select where you have a select_one for State, then one for District, then one for Teshil, then one for Village and then one for PSU.
And then you can generate the ID through the concatenation of the selection made.
Look at expressions

then this is the constraint.
not(${Q104} <=3 and . !=7)
This means that you can not have at the same time age<=3 and other option than 7 (Not applicable)

this is the correct constraint
not(selected(${Agree}, '2') and (. =1))

Anil-Sample09-export.xlsx (19.2 KB)

2 Likes

Dear Aurdipas,

Good Morning!!!

Thanks a ton for your support and guidance.

I will check your suggested command a get back to you soon.

Thanks & regards,

Anil

Dear Aurdipas,

How do we fix up the date and time field variable.

Let suppose date (Today date is 27th April 2020). I want date will be accept only today date only not date will be accept neither previous date nor forward date.

Same thing for time field. (Time accept only current time which time we entering our data.)

Thanks & regards,

Anil

1 Like

Dear @AnilRawat,

if you want to capture the day of the survey and the time of teh survey I suggest you to use the metadata today (Day of the survey.) and start (Start date and time of the survey)

Dear Aurdipas,

Can we two different command in constraint column.

I am enclosing my xlsx file for your reference. Please check Q105. I have made a check for that both are not working.

I have marked query in yellow colour.Anil-Sample09-export.xlsx (19.4 KB)

Thanks & regards,

Anil

Dear Aurdipas,

As you suggested to choose metadata to fix your survey date and time. When the Operator/Investigator enter the data only that day date and time will be accepted by tablets. If he is trying to change the date and time it will not accept those date and time.

I am check but not working. Please suggest where do we write this command.

Can we two different command in constraint column.

I am enclosing my xlsx file for your reference. Please check Q105. I have made a check for that both are not working.

I have marked query in yellow colour.Anil-Sample09-export.xlsx (19.4 KB)

Thanks & regards,

Anil
Anil-Sample09-export.xlsx (19.3 KB)

1 Like

Hi @AnilRawat,

I encourage you to search the forum and also try to main one thread for specific issue.

Check out this post it may shed some light Can't get Date Constraint working - #5 by yanokwa

Dear Aurdipas,

I am waiting for your response of my query.

Please guide me.

Thanks & regards,

Anil