Jump to content
Sign in to follow this  
vplw

"Too many separators in this function?"

Recommended Posts

Hi I have a problem I was hoping to get some advice on. I have a function created by a former colleague that is meant to draw from various data fields to creat an address for letters and mailing labels. See below:

If(Length(Title)>0 or Length(First Name)>0 or Length(Surname)>0,

If(Length(Title)>0,Title & " ","") &

If(Length(First Name)>0,First Name & " ","") &

If(Length(Surname)>0,Surname & "¶","¶"),"") &

If(Length(Position)>0,Position & "¶","") &

Case(Addressing = "Exchange Institution",

If(Length(Agreements Database by Primary Institution::Institution Name )>0, Agreements Database by Primary Institution::Institution Name &

[color:red]If(Length(Agreements Database by Primary Institution::Campus)>0, ", " & Agreements Database by Primary Institution::Campus & "¶","¶") ,"") &

If(Length(Agreements Database by Primary Institution::Address Line 1)>0, Agreements Database by Primary Institution::Address Line 1 & "¶","") &

If(Length(Agreements Database by Primary Institution::Address Line 2)>0, Agreements Database by Primary Institution::Address Line 2 & "¶","") &

If(Length(Agreements Database by Primary Institution::Address Line 3)>0, Agreements Database by Primary Institution::Address Line 3 & "¶","") &

If(Length(Agreements Database by Primary Institution::City)>0, Agreements Database by Primary Institution::City & " ","") &

If(Length(Agreements Database by Primary Institution::State)>0, Agreements Database by Primary Institution::State & " ","") &

If(Length(Agreements Database by Primary Institution::Postal Code)>0, Agreements Database by Primary Institution::Postal Code,"") & "¶" &

If(Length(Agreements Database by Primary Institution::Country)>0, Agreements Database by Primary Institution::Country,""),

Addressing="Study Abroad Program",

If(Length(Study Abroad Programs by Primary::STAB Program)>0, Study Abroad Programs by Primary::STAB Program & "¶","") &

If(Length(Study Abroad Programs by Primary::STAB Program Street 1)>0, Study Abroad Programs by Primary::STAB Program Street 1 & "¶","") &

If(Length(Study Abroad Programs by Primary::STAB program Street 2)>0, Study Abroad Programs by Primary::STAB program Street 2 & "¶","") &

If(Length(Study Abroad Programs by Primary::State)>0, Study Abroad Programs by Primary::State & " ","") &

If(Length(Study Abroad Programs by Primary::City)>0, Study Abroad Programs by Primary::City & " ","") &

If(Length(Study Abroad Programs by Primary::Post Code)>0, Study Abroad Programs by Primary::Post Code & "¶","¶") &

If(Length(Study Abroad Programs by Primary::Country)>0, Study Abroad Programs by Primary::Country,""),

Addressing = "Overseas" or Addressing="Local",

Address Line 1 & "¶" &

If(Length(Address Line 2)>0,Address Line 2 & "¶","") &

If(Length(City)>0,City & " ","") &

If(Length(State)>0,State & " ","") &

If(Length(Postcode)>0,Postcode & "¶","¶") &

Country,

Addressing = "University of Sydney",

If(Length(Room Number)>0,Room Number & " ","") &

If(Length(Building Name)>0,Building Name,"") &

If(Length(Building Code)>0, " - " & Building Code & "¶","¶") &

If(Length(Department)>0,Department & "¶","") &

If(Length(Faculty)>0,Faculty,"") &

"¶University of Sydney"

,"")

I am trying to delete the 8th line:

"If(Length(Agreements Database by Primary Institution::Campus)>0, ", " & Agreements Database by Primary Institution::Campus & "¶","¶") ,"") &"

but each time I do, I receive an error message that there are "Too many separators in this function" at the 17th line:

If([color:red]Length(Study Abroad Programs by Primary::STAB Program)>0"

I was able to delete this line in a similar function with no problems.

Help??!!

Share this post


Link to post
Share on other sites

Dear all

Sorry, I've posted this in the wrong place. Apologies all round. I'll try to find the right place.

Share this post


Link to post
Share on other sites

These 2 lines are linked together, because the 1st line is not closed:

If(Length(Agreements Database by Primary Institution::Institution Name )>0, Agreements Database by Primary Institution::Institution Name &

If(Length(Agreements Database by Primary Institution::Campus)>0 , ", " & Agreements Database by Primary Institution::Campus & "¶","¶") ,"")

[P.S. I moved the topic, to "Calculation engine, define fields".

Also, in my opinion you do not (ever) need the word "database" in a table occurrence name. After all, it's all in a database.]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.