setvalueSet, extracting from multiple choice question

Discussions about CSEntry
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

I only have one data file within the folder. I have restarted the computer as well but still getting the message that data file is used by another run.

Secondly, when I am running form or running pff file, it does not ask me which data file to open.

My Tehsils_Dict is also opened with the main dictionary. Now I have created the lookup file, should I drop this dictionary or it will remain as is?

thanks so much for your time!
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

Sorry, i have found the issue related with data file. Both lookup and main dictionaries were using one data file. I have created another one for lookup dictionary. Do we really need a data file for lookup dictionary?

After this, when i ran the application, it did not accept the valid tehsil code within the district. Here is how my lookup.dat file look like:

1111first tehsil name in district 1
1112second tehsil name in district 1
1221first tehsil in district 2
1222second tehsil in district 2

The above entries does not seems correct to me. The first 1 with every line seems extra....

The district codes are 1, 2 and 3 respectively since I have only three districts. And tehsil codes are 11,12 for first district, 21,22 for second district and 31,32 for the third district. Keeping this in view, could you please see if i have made my excel file correctly?

many thanks
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: setvalueSet, extracting from multiple choice question

Post by josh »

The two data files are needed. You can't store two different dictionaries in the same file since the file formats will be different.

The extra 1 you are seeing in the data file is the record type. When your dictionary has multiple record types (housing, population, deaths...) this is how CSPro tells one record from another. In your lookup since you only have one record type this isn't really needed. You can get rid of it by setting the length of the record type in the dictionary to zero. If you do that, make sure to regenerate the lookup data file using ExcelToCSPro.

The data file looks fine to me.
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

OK I did that and now there is 0 instead of 1 for each line. After this, when i ran the application, it says did not find the match in the lookup...
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: setvalueSet, extracting from multiple choice question

Post by josh »

Can you zip the application (use Pack Application from tools menu) and post it here along with the lookup data file?
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

here is the zip file...
Attachments
Facility.zip
(3.17 KiB) Downloaded 316 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: setvalueSet, extracting from multiple choice question

Post by josh »

Your zip doesn't include the data file but when I create my own data file it works for me. I'm attaching the spreadsheet and data file I used.
Attachments
Tehsil.xlsx
(10.08 KiB) Downloaded 293 times
Tehsils_Data.txt
(141 Bytes) Downloaded 310 times
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

my data file is also same as yours but it is still not working. When i am entering the tehsil code within range, it says "did not match" but when i enter tehsil code out of range (for example 99) then it says "out of range".
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: setvalueSet, extracting from multiple choice question

Post by josh »

I'm pretty sure that you didn't pick the correct data file then when you ran the application. Beware of Windows hiding the file extensions which can lead you to pick the wrong file. See https://www.howtohaven.com/system/show- ... orer.shtml for to make Windows show the file extensions. Then pick the file "Tehsils_Data.txt" and not "Tehsils_Data.txt.idx" or " Tehsils_Data.txt.log" or anything else.

The out of range error comes if the value you enter is not in the value set. The range check happens first, before the logic is run, so if the value is out of range (like 99) you will get the out of range error and the loadcase will never get called.
pcpak
Posts: 19
Joined: September 8th, 2016, 3:45 am

Re: setvalueSet, extracting from multiple choice question

Post by pcpak »

I did try after deleting old data files but no success...Anyways, our data entry has started from today, so I had to give up on this. I will keep on trying and can implement in the future projects.

Thank you so much for your time. I really appreciate it very much!
Post Reply