Dear Josh
Kindly assist i am using %NAME% where NAME is the coding variable to recall the answer of previous question for the next question so that the interviewer can read the previous answer. I have noted that in numeric answers/value sets, the next question displays number of the value set instead of the label. In this picture the value set is 11 coded as cartridges
Generate CAPI questions
Re: Generate CAPI questions
- Attachments
-
- Users Instrument.zip
- (26.15 KiB) Downloaded 277 times
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Generate CAPI questions
You have to assign the label in logic. One way to do it is by creating a function:
PROC GLOBAL
function string StockItem1Label()
StockItem1Label = getlabel(STOCK_ITEM1, STOCK_ITEM1);
end;
Then use %StockItem1Label% in the CAPI text.function string StockItem1Label()
StockItem1Label = getlabel(STOCK_ITEM1, STOCK_ITEM1);
end;
Re: Generate CAPI questions
Dear Josh
On the same form attached in the previous question, i have a code to check if disposed quantity is greater than stocked amount.
In case data is not available, i have a special code of 9,999=Missing.
When i am making the sum as indicated below i find error on the sum because the missing value has been included in the summation. What coding should i add to avoid it?
Example code:
totstock=STOCKED_2013 + STOCKED_2014 + STOCKED_2015 + STOCKED_2016 + STOCKED_2017 + STOCKED_2018;
totdisposal=QUANTITY_2013 + QUANTITY_2014 + QUANTITY_2015 + QUANTITY_2016 + QUANTITY_2017 + QUANTITY_2018;
If totdisposal>totstock then errmsg(7);
reenter QUANTITY_2013;
endif;
On the same form attached in the previous question, i have a code to check if disposed quantity is greater than stocked amount.
In case data is not available, i have a special code of 9,999=Missing.
When i am making the sum as indicated below i find error on the sum because the missing value has been included in the summation. What coding should i add to avoid it?
Example code:
totstock=STOCKED_2013 + STOCKED_2014 + STOCKED_2015 + STOCKED_2016 + STOCKED_2017 + STOCKED_2018;
totdisposal=QUANTITY_2013 + QUANTITY_2014 + QUANTITY_2015 + QUANTITY_2016 + QUANTITY_2017 + QUANTITY_2018;
If totdisposal>totstock then errmsg(7);
reenter QUANTITY_2013;
endif;
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Generate CAPI questions
Take a look at this: http://www.csprousers.org/help/CSPro/se ... ement.html
You can use that functionality to change the behavior of mathematical operations so that special values (missing, notappl, default) are treated as 0 values.
You can use that functionality to change the behavior of mathematical operations so that special values (missing, notappl, default) are treated as 0 values.
Re: Generate CAPI questions
Dear Martin
Thanks for your support, works very nice
Thanks for your support, works very nice
-
- Posts: 37
- Joined: August 17th, 2018, 6:09 am
Re: Generate CAPI questions
Dear CSPro uesr
I developing a CAPI application. For this, I defined the CAPI language "ENG" = English (_VS1) and "NEP" = Nepali (_VS2). First of all I have added all CAPI question, label and code in English. After then, I added the Nepali CAPI question, label and code as well. Now, when I changed the language from Option menu, the CAPI question changed in Nepali but the label and code not changed (shows in English). I cant fond the mistake.
Thank you
With best regards
Arjun
I developing a CAPI application. For this, I defined the CAPI language "ENG" = English (_VS1) and "NEP" = Nepali (_VS2). First of all I have added all CAPI question, label and code in English. After then, I added the Nepali CAPI question, label and code as well. Now, when I changed the language from Option menu, the CAPI question changed in Nepali but the label and code not changed (shows in English). I cant fond the mistake.
Thank you
With best regards
Arjun
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Generate CAPI questions
See these posts:
http://www.csprousers.org/help/CSPro/de ... uages.html
http://www.csprousers.org/help/CSPro/mu ... aries.html
Instead of creating different value sets for each language, which was the only way to do this in older versions of CSPro, you will want to create a multiple language dictionary. Add "ENG" and "NEP" to the dictionary and then set the labels as appropriate. Once you do this, when you change the language, the 1) question text; 2) value sets; 3) form labels should all change.
http://www.csprousers.org/help/CSPro/de ... uages.html
http://www.csprousers.org/help/CSPro/mu ... aries.html
Instead of creating different value sets for each language, which was the only way to do this in older versions of CSPro, you will want to create a multiple language dictionary. Add "ENG" and "NEP" to the dictionary and then set the labels as appropriate. Once you do this, when you change the language, the 1) question text; 2) value sets; 3) form labels should all change.
-
- Posts: 37
- Joined: August 17th, 2018, 6:09 am
Re: Generate CAPI questions
Dear Gregory,
Thank you for your response. Than, I tried to my label best to do this, but its not working. So, I have attached my application in this email. Please have a look in my application and suggested me what mistake I have made.
With best regards,
Arjun.
Thank you for your response. Than, I tried to my label best to do this, but its not working. So, I have attached my application in this email. Please have a look in my application and suggested me what mistake I have made.
With best regards,
Arjun.
- Attachments
-
- APPs.zip
- (37.64 KiB) Downloaded 285 times
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Generate CAPI questions
You need to add the multiple languages under the same value set name. For example, look at the screenshot.
Instead of having two values sets, you should only have one. Click on the language bar, change to NEP, and then modify the value labels from Yes/No -> चाहन्छु/चाहन्न. In other words, you will never have two value sets, one for English and one for Nepali, but will instead have one value set with two sets of labels, one in English and one in Nepali.
Instead of having two values sets, you should only have one. Click on the language bar, change to NEP, and then modify the value labels from Yes/No -> चाहन्छु/चाहन्न. In other words, you will never have two value sets, one for English and one for Nepali, but will instead have one value set with two sets of labels, one in English and one in Nepali.