dear forum,
1.I need to restrict a field to accept only 4 numbers during entry
2. I need to restrict field not to accept zero during entry.
kindly someone help me iam in trouble.
thank you
titus
restricting number for fields
-
- Posts: 572
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
Re: restricting number for fields
Dear Titus
1.I need to restrict a field to accept only 4 numbers during entry
2. I need to restrict field not to accept zero during entry.
There are two options:
Option 1:
Option 2
You can set range other than {0} in the value set labels.
a.
1.I need to restrict a field to accept only 4 numbers during entry
Code: Select all
numeric findlength=length(strip(maketext("%d",variablename)));
if findlength<4 then
errmsg ("Answer is not correct.");
reenter;
else
endif;
There are two options:
Option 1:
Code: Select all
If variablename= 0 then
errmsg ("You can not enter [...Zero...]", );
reenter;
else
endif;
You can set range other than {0} in the value set labels.
a.
Re: restricting number for fields
thanks very much khurshid.
it worked well
it worked well
Re: restricting number for fields
thanks khurshid, hope am not bothering you a lot , am new to Cspro, am under crisis please, now have tried to put a command for multiple responses so that am able to select more than one responses in tablet. kindly help me please.