We are working with lookup tables and I think We have a limitation associated with the number of digits in the rowcode which makes the syntax not working. But I’m not sure at all.
In the survey the idea is to ask for the unique registration number of the producers in the National Fruit and Vegetable Registry. These numbers are unique for each producer and have 12 digits, some can start with the value 0, that’s why it is entered as a string variable and then converted to numeric one and that is the rowcode value that is searched in the table.
First we want to verify that the entered registration number exists and if it does not exist, a Warnig is activated.
Secondly, we want to associate surface data and number of fruit plants declared by that registration number with the surface entered in the survey, if there is a coincidence of surface areas, the idea is not to ask the number of plants because this is a data already available, only if they do not match the plants will be ask.
Even if 12 digits would be acceptable, 15 or 20 digit rowcodes would not.
Or assume you have alphanumeric registration ids…
What I did in a similar case was putting them not in a lookup table but in a variable like this:
where text1 refers to the registration id question.
This variable returns the line where the id was found or -1 if not found.
check if the variable is > 1, then it exists, if it is -1 it doesn’t.
Put these data in a lookup table with rowcodes corresponding to the row of the id in the variable.
If the variable does not return -1, use its value to index into the lookup table.
Note: There’s a limit to how many characters you can put in an expression, so you may have to use several variables with partial registration id lists (I had to use 15 vars to fit my list).
Thank you for your help. I will take your advice.
But in this particular case I have 4 lookup tables full of ID numbers as rowcode and a variable as surface of plants, so I think that I will have limits if I try your idea with vars for each ID number.
My serch syntax (ID number existence ) as Warning works when I have until 10 digits in the rowcode value and the same with the syntax var that takes the value of the row variable in the lookup table ( surface associated with the ID number existing).
But when the lookup table has at least one rowcode with more than 10 digits no one syntax seems to works even if the rowcode value has less than 10 digits and exists (producers or farmers can have more than one Id number) .
It is like the presence of that value with more than 10 digits makes not work the other existing rowcode values.