Hi PI Experts,
I would like to seek your advice.
Problem:
I have 3 queues namely student, IDand grade. Basically, I just need to get the grade of the student. To achieve that, I have to find the match of the student and the id. If they match, I will get the corresponding grade of that id.
student | A | A | A | A | B | B | B | C | C | C | C | D | D | D |
id | Z | Y | X | A | W | B | C | V | U | T | S | D | R | Q |
grade | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 |
Notes:
1. There's always a match between student and id but not vice versa. It's possible that an id exists and it doesn't have a corresponding student.
From the sample above, ids Z,Y and X exist but there's no student Z,Y or X. However, all students (A, B, C, D) always have match in id.
2. id and grade is always 1 to 1.
3. Values in student may repeat but id doesn't as shown in the sample.
Expected Result:
- The grade of student A is 1
- The grade of student B is 0
- The grade of student C is 1
- The grade of student D is 1
Structure:
I have created a simple UDF for that
The contexts I've used for the following fields are
student - RECORD
id - item (default)
grade - item (default)
The mapping works fine if the data is small. But every time I test it with a big set of data (thousands of lines), it's failing. The UDF always returns NULL. I'm not sure why.
Appreciate any inputs regarding this.
Thank you.
Max