script for instant JChem for a calculated field

User 247c00dc1d

20-01-2012 22:24:15



please, I need help in scripting for instant JChem for a calculated field. I have next task: exists the field "CAT" with data which coded by letters (as example a, f, g,) ,  need to fill other data field "LOGK" in dependence of data in field CAT, as examle:


if CAT(i) = "a" then LOGK(i) = 456 \\ if in row "i" field CAT contain "a" then into field LOGK write "456"

else if CAT(i) = "f" then LOGK(i) = 587

else if CAT(i) = "g" then LOGK(i) = 678

else  LOGK(i) = ###

table before

cat logk  
f empty     
g empty

table after script

cat logk       
f 587
g 678



User 247c00dc1d

22-01-2012 11:53:17


I found the solution)


it realized by integrated programming language "Groovy", and look like:


if (CAT== "F")

{return 587}

else if (CAT== "G")

{return 678}


ChemAxon 8da0306fb7

23-01-2012 03:08:50

Thanks for sharing your solution! This will be helpful for other users. 

Let us know if you have any more question.