One of those moments that you sort your own problem. I managed to make it work by combining it with a concat function and adding several IF operation. It runs on the system quite well. However if anyone has shorter way of doing it I will really appreciate. This is the way I wrote the calculate to enable me check 20 different questions and return String from one of 20 other questions to my question:
calculate=“if(/HHList_14A13/Kish1= 1,concat(/HHList_14A13/Member1,‘’),if(/HHList_14A13/Kish1= 2,concat(/HHList_14A13/Member2,‘’),if(/HHList_14A13/Kish1= 3,concat(/HHList_14A13/Member3,‘’),if(/HHList_14A13/Kish1= 4,concat(/HHList_14A13/Member4,‘’),if(/HHList_14A13/Kish1= 5,concat(/HHList_14A13/Member5,‘’),if(/HHList_14A13/Kish1= 6,concat(/HHList_14A13/Member6,‘’),if(/HHList_14A13/Kish1= 7,concat(/HHList_14A13/Member7,‘’),if(/HHList_14A13/Kish1= 8,concat(/HHList_14A13/Member8,‘’),if(/HHList_14A13/Kish1= 9,concat(/HHList_14A13/Member9,‘’),if(/HHList_14A13/Kish1= 10,concat(/HHList_14A13/Member10,‘’),if(/HHList_14A13/Kish1= 11,concat(/HHList_14A13/Member11,‘’),if(/HHList_14A13/Kish1= 12,concat(/HHList_14A13/Member12,‘’),if(/HHList_14A13/Kish1= 13,concat(/HHList_14A13/Member13,‘’),if(/HHList_14A13/Kish1= 14,concat(/HHList_14A13/Member14,‘’),if(/HHList_14A13/Kish1= 15,concat(/HHList_14A13/Member15,‘’),if(/HHList_14A13/Kish1= 16,concat(/HHList_14A13/Member16,‘’),if(/HHList_14A13/Kish1= 17,concat(/HHList_14A13/Member17,‘’),if(/HHList_14A13/Kish1= 18,concat(/HHList_14A13/Member18,‘’),if(/HHList_14A13/Kish1= 19,concat(/HHList_14A13/Member19,‘’),if(/HHList_14A13/Kish1= 20,concat(/HHList_14A13/Member20,‘’), ‘’))))))))))))))))))))”
···
On Sunday, April 14, 2013 11:49:08 AM UTC+3, Kenyan Aloo wrote:
Hello Kobo Users,
I am currently working on developing a form for sampling that uses a household listing and KISH Grid system. I would like to use the IF function together with calculate. Is there a way around it. Let me give an example of what am trying to do. I would like to use CALCLUATE to check IF a previous Question had a given value IF SO it concats from a different question, ELSE it checks another value to make it concat from a different Question. Has somebody ever tried using the IF function? Will really appreciate some help on this. Further still anyone developed a form based on KISH grid?
Thank you.
Aloo