Skip to main content

Script Assistance

Hi Brian
I trust that you are well? I have created an IDEA v8.5 script to test the validity of a RSA Identification Number which is 13 digit number basedon a specific algorithm.
My script runs fine, and outputs the correct result. However I keep getting the following error:
Error on line 215 - A valid field name is required.
I have attached the Script File and sum data. Can you maybe check what's wrong with my script please.
Thank you in advance
Regards
Aveen

Files
90.gif (3.28 KB)
5_0.gif (7.95 KB)

Brian Element Mon, 07/01/2013 - 13:05

Hi Aveen,

I just tried it out in V9 and I did not get the error.  I will try it out tomorrow on my work computer that still has version 8.5 and see if I can get the same error.  The error seems to be pointing to where you are removing the fields from the IDnumber file.  I get two invalid ID numbers as the output, is that what is exepcted?  Also with the name of the description did anything change or remove the field, this would give the error.

So right now I am not sure what the problem would be as the script looks like it shouldn't have a problem.

I created a custom function that seems to work, it is based on info from this site so you can try it out and also use it in your script if you wish.

Files
69_0.gif (7.55 KB)

Brian Element Tue, 07/02/2013 - 07:37

Hi Aveen,

It turns out the problem is that for those two fields the field name is in lower case, they need to be in upper case.  So Char13_of_IDNum needs to be CHAR13_OF_IDNUM and Valid_Invalid needs to be VALID_INVALID.  It looks like in V9 of IDEA that they have normalized the field names so that IDEA will put the field name in uppercase, that is why I didn't have a problem in V9.

Thanks

aveenm293 Wed, 07/03/2013 - 05:18

Hi Brian
Thank you very much. I didn't think it would be that simple. I updated the script and it works perfect.
Regards
Aveen
 

Brian Element Wed, 07/03/2013 - 05:32

Hi Aveen, sometimes we get lucky and it is that simple.  Also if you have a chance and try out the custom function and see if it gets the same results, it should.

Thanks

Brian