Dear Gregory Martin
I want to find data by row instead by column. For example:
I have 6 variables and 25 rows and now i want to find first value "<=10" in 25 rows but by row.
Regards.
arshad
find data by row
-
- Posts: 580
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
-
- Posts: 580
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
Re: find data by row
Dear Gregory
I am using Vertical (Column-oriented) and Free Movement (Horizontal) for Find Data by row.
Please Advise.
Arshad
I am using Vertical (Column-oriented) and Free Movement (Horizontal) for Find Data by row.
Please Advise.
Arshad
-
- Posts: 1812
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: find data by row
Have you looked into the seek function? It will find data by occurrence number, which means that it will search for the first occurrence (row) that satisfies a given condition.
-
- Posts: 580
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
Re: find data by row
Dear Gregory Martin
Basically we are using random sticker for individual selection from roster. For reference i am sending dummy excel file and cpro file.
Please see syntax. Is this fine or we can write in better way. The second thing is the error message is not working on second variable (V2) on 10th occurrence.
Regards and take care.
arshad
Basically we are using random sticker for individual selection from roster. For reference i am sending dummy excel file and cpro file.
Please see syntax. Is this fine or we can write in better way. The second thing is the error message is not working on second variable (V2) on 10th occurrence.
Regards and take care.
arshad
- Attachments
-
- Test.rar
- CPro file
- (5.72 KiB) Downloaded 457 times
-
- sticker.xlsx
- Excel file
- (8.84 KiB) Downloaded 445 times
-
- Posts: 1812
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: find data by row
The error message is not working for you because when you use Free Movement mode, all logic is turned off. This is because Free Movement mode is designed to allow a keyer to enter data without worrying about the order of entering the data. Thus, the concept of checks and actions does not necessarily make sense. You can put your logic checks in the postproc of the roster.
Unfortunately, your PROC QID logic is your best option if you want to use Free Movement mode. If you don't mind separating your rows into separate rosters, you can use subitems to make the logic easier. See attached for an example.
Unfortunately, your PROC QID logic is your best option if you want to use Free Movement mode. If you don't mind separating your rows into separate rosters, you can use subitems to make the logic easier. See attached for an example.
PROC QID2
Numeric FindIndex;
FindIndex = Seek(Q<=$);
If FindIndex > 0 then
Errmsg("Data found in row #%d, value is %D",int(( FindIndex + 9 ) / 10),Q(FindIndex));
endif;
Numeric FindIndex;
FindIndex = Seek(Q<=$);
If FindIndex > 0 then
Errmsg("Data found in row #%d, value is %D",int(( FindIndex + 9 ) / 10),Q(FindIndex));
endif;
- Attachments
-
- Test.zip
- (2.86 KiB) Downloaded 457 times
-
- Posts: 580
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
Re: find data by row
thanks.
arshad
arshad