setocclabel with two variables...

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

setocclabel with two variables...

Post by Yass »

Hi All

Code: Select all

[code]

do  i = 1 while i <= totocc(SECTION2000)
		setocclabel(SECTION2000(i), concat(strip(S2Q1(i))," ",(NET(strip((i))));
	enddo;
	
	
	
[/code]

Please help is needed to fix the error below
ERROR: Invalid character expression near line 20 in DATUN_QUEST procedure


Thanks
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: setocclabel with two variables...

Post by Gregory Martin »

You need to reverse the order of NET/strip. It can be helpful to debug problems when you write your code more explicity. For example:
string occ_label = strip(S2Q1(i)) + " " + strip(NET(i));
setocclabel(SECTION2000(i), occ_label);
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: setocclabel with two variables...

Post by Yass »

Thanks Greg,

Please can you help me ON this , I have a listing application that has this .pff

Code: Select all

if fMode = 1 then
	filewrite(pffFile1,"StartMode=add;%s",CLUSTER_NO);
	elseif fMode = 2 then 
	filewrite(pffFile1,"StartMode=Modify");
	endif;
My issues is when i select Modify Mode (fMode=2), I have all the cases for other clusters. I want the situation that Modify mode will only bring about the list of all structures (case) in a Cluster. Am using a file for all entry. How do I go around with this please.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: setocclabel with two variables...

Post by Gregory Martin »

I suggest that you start a new topic if asking a different question from the original topic.

If you only want to show certain cases in the case listing, you can use the PFF's CaseListingFilter option. See here:

http://www.csprousers.org/help/CSPro/ru ... entry.html

For example, CaseListingFilter=12 would only show cases that have an ID start starts with 12.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: setocclabel with two variables...

Post by Yass »

Thanks Greg,

I need a clarification on the CaseListingFilter=12 example:
Let say the cases are saved based on the Cluster numbers and structureno. The team working are assigned 10 Clusters. All members will enter a cluster and complete it before they move to another. This means the interviewer will have all cases of cluster 1 - 10.

For example Interviewer12 will have
  • 1000111
    1000112
    1000113
    1000211
    1000212
    1000213
    1000311
etc

The first five digits is the ClusterNo.
What I was looking for is , if am in a modify mode i will like to see a ClusterNo listing like only
  • 1000111
    1000112
    1000113
I wrote this but it not working :P :oops:

Code: Select all

CaseListingFilter=CLUSTERNO:
if fMode = 1 then
   filewrite(pffFile1,"StartMode=add;%s",CLUSTER_NO);
   elseif fMode = 2 then
   filewrite(pffFile1,"StartMode=Modify");
   endif;
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: setocclabel with two variables...

Post by Gregory Martin »

You would write it like:
if fMode = 2 then
    filewrite(pffFile1,"CaseListingFilter=%05d",CLUSTERNO);
endif;
That line has to be in the PFF file.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: setocclabel with two variables...

Post by Yass »

Hi Greg,

I am not still have the result i want on the modify option... I have pls send you the application for a look. Thanks for your support.
Post Reply