Capi text condition

Discussions about CSEntry
Post Reply
samuelhaniel
Posts: 13
Joined: August 4th, 2023, 11:13 am

Capi text condition

Post by samuelhaniel »

Dear All,

I would like to add conditions on Cspro CAPI text (.qsf) in a manner of Q100 = 1 AND Q102 = 2. and in Another Question Q200 = 1 OR Q202 = 2. Cspro returns invalid character. How do i go about it.

Thanks,
Sami
justinlakier
Posts: 238
Joined: November 21st, 2022, 4:41 pm

Re: Capi text condition

Post by justinlakier »

Hello,

See this documentation on the qsf (https://www.csprousers.org/help/cspro/q ... e_qsf.html). The Question Text File is in YAML format. It is automatically made by CSPro. Rather than trying to code conditions into the YAML file, the way to do this is to add these conditions to your CSPro code which check or change the message before printing it. You can make this easier with set error messages, as mentioned in the ErrMsf Function documentation (https://www.csprousers.org/help/cspro/e ... ction.html). You can set up conditional checks in your code which will change a message's number, so that it will for instance give error message #2 instead of error message #1. This is all done in the CSPro editor rather than opening the .qsf file. Let us know if you have additional questions.

Hope this helps,
Justin
samuelhaniel
Posts: 13
Joined: August 4th, 2023, 11:13 am

Re: Capi text condition

Post by samuelhaniel »

I found some software (developed in python) which changes excel file containing question text to .qsf file. The software rejects conditions like Q100 = 1 AND Q102 = 2. Anyways i have edited them manual in the Cspro CAPI text because there were few of them. Now I would you to help me in getting deviceID and changing the tablets name and export them to excel file using cspro application. We have about 80 tablets, i don't want to do it manually.

Thanks,
Sami
htuser
Posts: 649
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Capi text condition

Post by htuser »

Now I would you to help me in getting deviceID and changing the tablets name and export them to excel file using cspro application. We have about 80 tablets, i don't want to do it manually.
To do this, I implemented a registration application able to automatically get and sync the deviceId. And it is mandatory to run it on each tablet in order to get all the deviceID's.

Right now, I also know that, when synced, the csdb and MySQL , the file_revisions table have a device_id colunm storing the deviceID.

Hope this help.
G.VOLNY, a CSProuser from Haiti, since 2004
samuelhaniel
Posts: 13
Joined: August 4th, 2023, 11:13 am

Re: Capi text condition

Post by samuelhaniel »

Thanks for your help. It solves all my problems.
Post Reply