Check each of your 6 variables, and update a counter to track the number
that are used.  Then use the counter to drive your if statement for what
to return.  I tested this idea with less variables, and it should work,
but I'm not sure if I understood how you're trying to return the values,
you may have to modify that part.

Something like this should get you started:

// Declare all the variables

Var_fieldcount = 0;
Var_one = '';
Var_two = '';
Var_three= '';
Var_four= '';
Var_five= '';
Var_six= '';

// Check each of the fields, and update the counter

if (Field("Variable1"))
    {
    Var_fieldcount++;
    Var_one = Field("Variable1") + '<br>';
    }
if (Field("Variable2"))
    {
    Var_fieldcount++;
    Var_two = Field("Variable2") + '<br>';
    }
 if (Field("Variable3"))
    {
    Var_fieldcount++;
    Var_three = Field("Variable3") + '<br>';
    }
if (Field("Variable4"))
    {
    Var_fieldcount++;
    Var_four = Field("Variable4") + '<br>';
    }
if (Field("Variable5"))
    {
    Var_fieldcount++;
    Var_five = Field("Variable5") + '<br>';
    }
if (Field("Variable6"))
    {
    Var_fieldcount++;
    Var_six = Field("Variable6") + '<br>';
    }
   
if (Var_fieldcount == 6)
    {Var_all = Var_one + Var_two + Var_three + Var_four + Var_five;} else
if (Var_fieldcount == 5)
    {Var_all = Var_one + Var_two + Var_three + Var_four + Var_five
+Var_six;}
else if (Var_fieldcount < 5)
    {Var_all = '<br>' + Var_one + Var_two + Var_three + Var_four + Var_five
+Var_six;}
else
    {Var_all = '';}

// Remove the line break after the last variable and return

Var_final = Left(Var_all, Len(Var_all)-4); 
return Var_final;

Good luck,

Paul Klingler
VDP Project Manager
TMR, Inc.

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 
Calling all FP Web Users!

Do you have a question or lots of knowledge to share about FusionPro Web?

If so, join our Printable Web to Print Users' Forum today!

Send email to [EMAIL PROTECTED] to find out how! 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


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