PERFECT!

Thank you Dan (and David), this is exactly what I was looking for.

To clarify (to others)... the data I receive doesn't always have the same Field Title/Name or is in the same order for the same recurring project. Dan's rule below will look for all the known Field Title/ Names (last line of rule), regardless of order their in and return the Field Title/Name that is present or an error message.

This rule saves me lots of time having to repetitively alter the same set of rules each time the project is processed from our master template.

Again... thank you so much!

Ryan

---------------

 function OneOfTheseFields()
  {
    var list = "";
    for (var i = 0; i < arguments.length; i++)
    {
      try
      {
        var result = Field(arguments[i]);
Print("Found Field \"" + arguments[i] + "\", value: " + result);
        return result;
      }
      catch (e)
      {
        if (list)
          list += ", ";
        list += arguments[i];
      }
    }

    var msg = "None of the fields were found: " + list;
    if (FusionPro.inValidation)
      return msg;

    Print(msg);
    return "";
  }

//Alter the field names below to known set used.

  return OneOfTheseFields("Company Name", "Company", "COMP");


--
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