Function or Script

25 posts / 0 new
Last post
Ahmed
Offline
Joined: 09/20/2017 - 05:45

Hi Brian,
I execute the script following your recomondation and i get this error message 
Thanks.

Images: 
Ahmed
Offline
Joined: 09/20/2017 - 05:45

Hi Brian,
This is the correct snapshot,
Thanks

Images: 
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Just a couple of questions.  Did it create any additional append files or did it give you the erorr on the first extract?  Second question is all your fields character except for the rate field?  The equation is assuming a character field so if one of your number fields is numeric that would give you this error.

Ahmed
Offline
Joined: 09/20/2017 - 05:45

Hi Brian,
First point; the script work correctly and yes for the error it was related to the type of field and I changed it from numeric to character. Seconde point; is, I split the database in 3 parts due to the performance of my computer and i was asking if is it possible to add for "Clientclose" after creating each field ?. Last point; that is related to my fault, is I forget to tell you that the field 'Rate' is in position 2 and there another field named 'Country' is in the first field so i would like to include it in the result.
Thank your very much for your helping.
Regards.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Thanks for the info.  Here is an update.

Ahmed
Offline
Joined: 09/20/2017 - 05:45

I think it's the same script; can you check please ?
Thanks

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Nope, it is the new one but it only needed a couple of changes to work.  If the for loop it is now a 2 instead of a 1 so it is starting with the third field.  There is a line to close the database db.close and another line to add the second field to the files.

Ahmed
Offline
Joined: 09/20/2017 - 05:45

I'm sorry Brian, but when I execute the old or the new script that you send to me, I get the same result.
I don't know where's the problem.
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Ahmed,

In the latest script do you see these lines in the extractFields() function:

task.AddFieldToInc sFieldNames(0)
task.AddFieldToInc sFieldNames(1)
task.AddFieldToInc sFieldNames(i)

If you don't then you are still using the old script.  Let me know.

Thanks

Brian

Ahmed
Offline
Joined: 09/20/2017 - 05:45

Hi Brian,
yes it's the old, here's the snapshot;
Thanks.

Images: 

Pages