Need help with Conditional Formatting

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Cassady
Posts: 170
Joined: Thu Aug 22, 2013 3:48 pm
Location: Sqornshellous

Need help with Conditional Formatting

Post by Cassady »

Hello all,

I am feeling fairly humbled (alternatively, stupid) at the moment, since I cannot get right what I am hoping should be simple to set up...
Hopefully, someone will be able to point me in the right direction, as I am spending too much time on this – relative to what must still be done! :oops:

I am currently working with Government reports, and have set up a user-created Format for them.
All is working as it should, but unfortunately, the Reports themselves are not proving consistent, which is introducing edge cases that I am trying to cater for.

Simply put, the format output I require, is a follows:

NameOfGovtDept [Author(s)/(Eds)] Title (year)

That is working as expected - in that, where the Author field is empty, I have managed to set up a Conditional Formatting rule to then use the Editor field, and add the "ed/eds" behind the names, which is obviously not included where the authors are used.
And as above, if there are either Authors or Editors, they must be enclosed in the [ ] brackets.

My problem:

I have reached the limit of my understanding of Conditional Formatting in those instances (and sadly, this happens too frequently for it to be done manually), where BOTH the Author or Editor fields are empty...

BE, due to how I have things set up, is now producing NameOfGovtDept [(ed)] Title (year)...
As in, instead of leaving the entire a/e field blank, it is inserting "[(ed)]" in its place.

I want BE to drop EVERYTHING where there is neither an Author or Editor, as in just output "NameOfGovtDept Title (year)"

Here is my Formatting code:

Code: Select all

u1 {[a]^[e $(ed)^^(eds)$]} t (d).
I suspect that I need to be using either the Binding Quote ~ ~ option, or be using the $ option differently?

Any suggestions would be welcome!
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Need help with Conditional Formatting

Post by Jon »

The default output for conditional groupings is the last option in the chain. If you want nothing output if none of the options fulfill the criteria you should terminate the chain with a ^. Bookends will output what comes after the last ^ (i.e. nothing). Like this

u1 {[a]^[e $(ed)^^(eds)$]^} t (d).

Jon
Sonny Software
Cassady
Posts: 170
Joined: Thu Aug 22, 2013 3:48 pm
Location: Sqornshellous

Re: Need help with Conditional Formatting

Post by Cassady »

Jon wrote:The default output for conditional groupings is the last option in the chain. If you want nothing output if none of the options fulfill the criteria you should terminate the chain with a ^. Bookends will output what comes after the last ^ (i.e. nothing). Like this

u1 {[a]^[e $(ed)^^(eds)$]^} t (d).

Jon
Sonny Software
Brilliant - thanks Jon, fixed perfectly.
And as always, really appreciate the quick response in support, and over a weekend at that!
Post Reply