Dear sir
Greetings!!
I have three queries related to data entry application.
First is related to visualvalue function
This is my code
Proc app_Quest
Preproc
If demode()=add then
If visualvalue(itemname)<>notappl then
Itemname=1
Else
Itemname=visualvalue(itemname) + 1
Endif
Endif
This should assign 1 to first case, 2 to second case during data entry.
It happens in one of three applications but does not happen in rest two applications.
This is really stranging.
It remains 1 for second case too or sometimes during modify mode it becomes 2.
What could be the reason. I am using same code. Shall i send my applications as attachment.
Second query is in roster
I have one item named totalmember
Then roster starts
First item is sno with some more items like name age etc
Sno field is sequential and protected
Roster has occurence controlled field name that is totalmember
Application works well in normal flow. If i enter 5 in totalmember then roster goes up to 5 occurence
But
If i modify a completed case, and change the 5 to 6 in totalmember field then sixth row starts display but when i go to enter sixth row detail, it says out of range in sno and then implement cleanup and close every thing. Please suggest.
Third query
I want to make one android based application which will run on tablet having android 4.2 or greater.
Currently in my laptop cspro 5.0 august 2013 is installed.
Shall i uninstall it?
Or some other way?
In my this application i want to use accept function to show menu and sysparm to make data file dynamically. Will that support in android application
Many thanks for help.
Regards
Manoj
Query in cspro
-
- Posts: 1812
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Query in cspro
1) All values are reset every time you start adding a new case, so ITEMNAME will always be notappl. It will no longer be notappl after you have entered a value into the field. What example are you trying to do with this code?
2) I was able to recreate your behavior with the sequential bug and I am not surprised that such an error occurred. The value for a sequential field is not being inserted properly in modify mode. You can work around this by keeping the field protected but removing the sequential status. Then in logic you can write:
2) I was able to recreate your behavior with the sequential bug and I am not surprised that such an error occurred. The value for a sequential field is not being inserted properly in modify mode. You can work around this by keeping the field protected but removing the sequential status. Then in logic you can write:
PROC FIELD
onfocus
FIELD = curocc();
3) You don't need to uninstall CSPro 5.0.3. Once you download the beta, you can run the _install.bat file and it will overwrite your current version of CSPro with the beta version. CSEntry for Android supports the accept and sysparm functions.onfocus
FIELD = curocc();
Re: Query in cspro
Dear Sir
Thanks for the reply
I am ok with 2 and 3 query's answer given by you.
Regarding query 1, Visual Value function,
I want a autonumber field which starts from 1 in my data entry application,
it is working in one of my application but it does not work in other applications. I am surprised. Why does it not run in other application, when I use the same code, only itenname is changed in the code for other applications.
The code is
Proc itemname
Preproc
if démodé()=add then
if visualvalue(itemname)=notappl
then
itemname=1;
else
itemname=visualvalue(itemname)+1;
endif;
endif;
itemname is id field
Thanks and Regards
Manoj
Thanks for the reply
I am ok with 2 and 3 query's answer given by you.
Regarding query 1, Visual Value function,
I want a autonumber field which starts from 1 in my data entry application,
it is working in one of my application but it does not work in other applications. I am surprised. Why does it not run in other application, when I use the same code, only itenname is changed in the code for other applications.
The code is
Proc itemname
Preproc
if démodé()=add then
if visualvalue(itemname)=notappl
then
itemname=1;
else
itemname=visualvalue(itemname)+1;
endif;
endif;
itemname is id field
Thanks and Regards
Manoj
-
- Posts: 1812
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Query in cspro
Is ITEMNAME a singly- or multiply-occurring item?
I still don't understand what you are trying to do? Do you want ITEMNAME to be 1 for the first case in your data file, 2 for the second case, 3 for the third case, and so on? If so, this code will never work, because ITEMNAME will always start out as NOTAPPL and so you'll always assign 1 to it. Actually, if ITEMNAME is a field with persistent properties, then it won't start out as NOTAPPL. Is this the case?
Or is ITEMNAME repeating, and you want to increment it for every occurrence of the roster that it's on?
I still don't understand what you are trying to do? Do you want ITEMNAME to be 1 for the first case in your data file, 2 for the second case, 3 for the third case, and so on? If so, this code will never work, because ITEMNAME will always start out as NOTAPPL and so you'll always assign 1 to it. Actually, if ITEMNAME is a field with persistent properties, then it won't start out as NOTAPPL. Is this the case?
Or is ITEMNAME repeating, and you want to increment it for every occurrence of the roster that it's on?
Re: Query in cspro
Dear Sir
Thanks for the reply.
It is single field item , not the multiple.
It is ID field of 4 digit
I want it to be sequential, case, as you said, 1 for 1 case, 2 for second case etc.
but this should not be for modify mode, as in modify mode, it changes to 2, next time, it changes to 3, that should not be.
So, you are saying, if I use the same code, with the tick persistent for field, then it will work.
Any suggestion?
Thanks and Regards
Manoj
Thanks for the reply.
It is single field item , not the multiple.
It is ID field of 4 digit
I want it to be sequential, case, as you said, 1 for 1 case, 2 for second case etc.
but this should not be for modify mode, as in modify mode, it changes to 2, next time, it changes to 3, that should not be.
So, you are saying, if I use the same code, with the tick persistent for field, then it will work.
Any suggestion?
Thanks and Regards
Manoj
-
- Posts: 1812
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Query in cspro
You can make your ID field both protected and persistent, and then write code like this:
PROC ID
preproc
if demode() = add then
if visualvalue(ID) = notappl then // this is the first case in the data file
ID = 1;
else // this is the second, third, etc. case in the data file
ID = visualvalue(ID) + 1;
endif;
endif;
preproc
if demode() = add then
if visualvalue(ID) = notappl then // this is the first case in the data file
ID = 1;
else // this is the second, third, etc. case in the data file
ID = visualvalue(ID) + 1;
endif;
endif;
Re: Query in cspro
Good code for work around on Sequential ID, the only problem is if you use several tablets and at the time of merging the data you get duplications.
I solved this problem changing the ID first number for each tablet, it's a little extra work but it solves many future problems.
I solved this problem changing the ID first number for each tablet, it's a little extra work but it solves many future problems.
Gregory Martin wrote:You can make your ID field both protected and persistent, and then write code like this:
PROC ID
preproc
if demode() = add then
if visualvalue(ID) = notappl then // this is the first case in the data file
ID = 1;
else // this is the second, third, etc. case in the data file
ID = visualvalue(ID) + 1;
endif;
endif;