Jump to content

This topic is 6403 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi there.

I am trying to list off authors in a database file.

I effectively have four fields and am unsure how to tie them together for a list.

First repeating field is text: authors_last_name

Second repeating field is text: authors_initial

Third field: book_name

Fourth field is: concatenated version of first three fields.

What Im trying to achieve is where there are two or more authors for any given book. Normally I would just field & field to concatenate them, but need to formulate it so that the single or multiple authors are listed as

Smith, J. Brown, S.

I then went on to want to add a single quote around the title - not sure how to do this - i thought adding a CHR() equivalent would be good.

I also want the title in italics - possible to do this on the fly?

Last effect thats bugging me is that some times the text line is long (long title and several authors), and sometimes short. How do I setup a field for Preview Mode where the lines are evenly spaced regardless of the length of the text?

This is several points together... may be I should ask them seperately?...

Any help would be appreciated.

Posted

Greg, DO NOT USE REPEATING FIELDS TO SIMULATE A RELATIONAL STRUCTURE!!

To add a single quote: "'"

To make text Italic: TextStyleAdd( Text ; Italic)

The reformatting you could probably cheat with, have a calculated field that converts the author's name james smith to smith J. i.e. LeftWords( name ; 1 ) & ", " & Left( RightWords( name ; 1 ) ; 1 ) & "."

Next, create a calc field in your primary table that just goes:

Substitute( List ( authors::nameCalc ) ; ¶ ; " " )

Anyway, the above will only work in a relational structure, do not use repeating fields to emulate.

Posted

OK - thanks for the advice re relational database GenX - I'll restructure what I have.

I tried the single quote thing but it draws double quotes instead - I thought Id have to do the URL thing of wordone%20wordtwo type thing, but you reckon that "'" will worl.

Cheers,

Greg

This topic is 6403 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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