Hi all,

I'm trying to get a couple of rules working. Support was helping me get
started, but we seem to be stuck on something b/c the rules won't actually
work correctly.

I have this in my globals:
var LastFieldValue = "";
var TrayNoIndex = 0;

For Rule #1:
I want to return some specific text each time the info in a certain field
changes, but only for the
first instance. So, for the first instance of info in a field, some text
would be returned and then not again until the info in that field changes.

I tried this:

var PreviousFieldValue = LastFieldValue;
LastFieldValue = Field("EndLine");
if (PreviousFieldValue != LastFieldValue)
  return "###";
else
  return "";

But it doesn't work as desired. I get ### for every record instead of just
for the first instance.

For Rule #2:
I need another rule that looks at that same 'EndLine' field and returns
sequential numbers. BUT, I want to return the same number for each record
with the same data in the 'EndLine' field and then return the next number
in sequence for the next unique instance in the field.

I tried this:

var TrayNoIndex = TrayNo[Field("EndLine")];
if (!TrayNoIndex)
  TrayNoIndex = TrayNo[Field("EndLine")] = ++TrayNoCount;
return TrayNoIndex;

When I try to use Rule #2, however, I get an error. Reference Error:
TrayNo is not defined.

I feel like I'm close, but obviously missing something. 

Thanks for any help!
-kim

--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED] 
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to