Search found 63 matches

by Saint
October 20th, 2016, 8:56 pm
Forum: Editing
Topic: Alpha to numeric
Replies: 3
Views: 6988

Re: Alpha to numeric

Hi Sharof,
Do you already have the data collected? Are you going to restructure the old data file to a new data file?
Anyways... This code should work.

Code: Select all

if pos ("A", Q36) then Q36A = 1; endif;
by Saint
September 18th, 2016, 10:10 am
Forum: Entry
Topic: ID of record
Replies: 2
Views: 2807

Re: ID of record

Hi,
Set the code to work only when in add mode as follows:

Code: Select all

PROC ID
preproc

if demode() = add then
  if visualvalue(ID) = notappl then
    ID = 1;
  else
    ID = visualvalue(ID) + 1;
  endif;
endif;
by Saint
September 17th, 2016, 1:29 am
Forum: Entry
Topic: Intersection between two strings
Replies: 1
Views: 2543

Re: Intersection between two strings

Hi, I assume string2 will always be a part of string1? Else what will be the output? Say string1 ABC and string2 is D. Otherwise, lets say you want the result in string 3 (with length 11 - can make it 12 if string 2 will not be part of string 1 sometimes), then the following code should work. Rememb...
by Saint
September 3rd, 2016, 5:53 am
Forum: Entry
Topic: Add extra option in array
Replies: 3
Views: 3131

Re: Add extra option in array

Hi Arsad, Try this: do varying i = 1 until i >= count(SECTOR_DICT.SECTOR_REC) { the arrays that we use for setvalueset start at 0 so we use i-1! } aDistrictCodes(i-1) = LF_SEC_ID(i); aDistrictNames(i-1) = LF_SEC_NAME(i); enddo; aDistrictCodes(i-1) = 999; aDistrictNames(i-1) = "Don't Know";...
by Saint
June 3rd, 2016, 1:11 pm
Forum: Entry
Topic: Filecopy and Fileconcat function
Replies: 7
Views: 7081

Re: Filecopy and Fileconcat function

Are the enumerator folders connected to a server? Or they are stand alone? Do you have the folders in the same location on all tablets? If the enumerator folders have a common path or being run on a server, then its quite easy, and I can send you a code for that.
by Saint
May 31st, 2016, 3:25 pm
Forum: Entry
Topic: Operator/System Controlled programmatically
Replies: 3
Views: 3716

Re: Operator/System Controlled programmatically

Are there any specific reasons why you want the different modes for add and for modify? That could help give you some suggestions. For example, I sometimes define some checks to only run when in add mode but not in modify, and that has been useful for a number of applications.
by Saint
May 22nd, 2016, 12:15 pm
Forum: Other
Topic: how to determine the age
Replies: 2
Views: 3825

Re: how to determine the age

Hi, More context is required to be able to help with any code. Are both partners being listed in some kind of roster?. At what point do you want to 'detect..'? Is it immediately after you enter the age of the second partner? Do you have a variable that identifies that this is the second partner? or ...
by Saint
May 22nd, 2016, 12:04 pm
Forum: Editing
Topic: Unique ID for every section
Replies: 5
Views: 9398

Re: Unique ID for every section

Another option is to export the data as 'wide' and then reshape to 'long'
by Saint
May 3rd, 2016, 8:30 am
Forum: Entry
Topic: Data Auto-fill in Roaster
Replies: 9
Views: 8650

Re: Data Auto-fill in Roaster

Hi Subash, Sure you can check. If I understand right, you want to check for example that Q211(1)=Q209(1) and return an error message if not? If that is the case, you can put the following check on the postproc of Q211. Not sure why you have different number of concurrences for Q209 and Q211. PROC Q2...
by Saint
April 26th, 2016, 5:19 pm
Forum: Editing
Topic: Creation of form
Replies: 3
Views: 6044

Re: Creation of form

Post your dictionary and I can get you started on the form.