Me again with another plea for help!! Now he wants me to add a column after each group of before and after with the heading of dose. I don't know how to write code, so I mimicked what you wrote. However, it then throws error messages for everything. We are doing VFE training in April, but he is tapping his foot wondering why I don't just put the column in already... I think I need to build a function for that column, but I don't know how. So, how do I build a function? For instance, you wrote the below and I mimicked it (and more throughout) to match the column I inserted but it says invalid. What else do I need to do to complete the function? I apologize for all the questions, I will be learning this soon (I hope!!) Thanks in advance!
!fn CommentTrans(field_count)
{
local comment_trans = ""
local comment_field = ""
comment_field = EVAL("DOCUMENT.COMMENT"+field_count)
if (comment_field = "") then
comment_trans = ""
else
if EVAL("DOCUMENT.BED"+field_count) <> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.DN_A"+field_count) <> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.DN_B"+field_count) <> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.LU_A"+field_count) <> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.LU_B"+field_count)<> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.BR_A"+field_count)<> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
else
if EVAL("DOCUMENT.BR_B"+field_count)<> "" AND (comment_field <> "") then
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
else
comment_trans = numtoascii(9) + numtoascii(9) + numtoascii(9) +numtoascii(9) + numtoascii(9) +numtoascii(9) + numtoascii(9) + numtoascii(9) + comment_field
endif
endif
endif
endif
endif
endif
endif
endif
Posted : March 11, 2013 10:15 pm