Joined: 03 Feb 2014
Online Status: Offline
Posts: 2
Topic: "This" Field Posted: 04 Feb 2014 at 11:39am
Hi all
My apologies if this is a stupid question, I cant find a answer for this one...I am not a programmer so go easy on me....
Is there anyway I can get a field to reference itself without having to refer to the actual field name in the formula.
I have a bunch of fields I need to write basic script for and change the field name, but if I could get the field name to reference itself, I could just write the one script and it could apply to all fields.
for example my code for the myfield1 field is
If {mytable.myfield1}=5 then crGreen else
If {mytable.myfield1}=1 then crRed
else crwhite
and myfield2
If {mytable.myfield2}=5 then crGreen else
If {mytable.myfield2}=1 then crRed
else crwhite
however, I would prefer
If {mytable.thisfield}=5 then crGreen else
If {mytable.thisfield}=1 then crRed
else crwhite
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum