Filtered follow up questions based on the data collector ID

1. What is the issue? Please be detailed.

I am having difficulties with a code whereby if a user enter the ID, then the follow up questions should be filtered according to the ID Input. For example where BT = Blantyre 01, LL = Lilongwe 02, Mz = Mzuzu 03, if a user enters the ID "BT-02-01" then the follow up question should pick either "BT" or "02" from the ID and then filter the follow up questions based on that.

1 Like

Hi @nafe86, Not sure I understood your question correctly, However, try checking out the substr() function. My idea is getting the characters you want from The ID using the calculate field then using the characters to filter the followup questions. i.e if the ID entered is "BT-02-01" getting the value "BT", add calculate field then substr(${ID}, 0,1) checkout all other functions here Substr.

Hope this will be useful


Hi Samwel

Thanks for your prompt response and yes you have understood the question. I am going to try your suggestion and provide feedback


1 Like