n7mafia Posted February 18, 2012 Posted February 18, 2012 I managed somehow to program myself a Book Inventory database that has a number of fields, such as for instance: Author Name: John Author Surname: Doe Title: Mystic house Location of Publishing: London Publisher: Associated Press Year: 2000 Now, I would like to know a single calculated (?) field which taking from the aforementioned fields would give me this result: J. Doe, Mystic house, London, Associated Press, 2000. Specifically, the calculation should: - take the 1st letter from the 'Author Name' field, trim the rest and add a full stop (John -> J.) - take the value from 'Title' field and put it in italic - take the rest of the values from the other fields - Finally display in one tidy line and in a single field the whole bibliography quote ready for me to copy it when I need to I wonder if that is possible at all? I tried messing around with text functions such as Textstyleadd but I couldn't even manage to get field 'Title' italicized. Please help guys.
bcooney Posted February 18, 2012 Posted February 18, 2012 Attached file. However, I would rather you had an Author Table, Publisher Table that is related to the Titles table. TextCalc.fp7.zip
n7mafia Posted February 18, 2012 Author Posted February 18, 2012 Thank you very much Bcooney, you truly saved my day. That is EXACTLY what I was trying to achieve (and judging by the complexity of the script I would have never achieved being my FMP proficiency quite basic).
bcooney Posted February 18, 2012 Posted February 18, 2012 It's not a script, it's a calc (just helping you learn the terms). It does not take into account any field being empty, btw, so it can be improved.
n7mafia Posted March 2, 2012 Author Posted March 2, 2012 I must have spoiled something around since now I get: F, Carrara, Reminiscenze di cattedra e foro, Bologna, Il Mulino, 2007. instead of: F. Carrara, Reminiscenze di cattedra e foro, Bologna, Il Mulino, 2007 Basically getting a comma instead of a full stop after the initial of the name of the author, I suspect something happened when I told filemaker to use "." as thousands separators and "," for decimals (that's the system we use in Italy); can anyone confirm my theory and/or offer a workaround? Note: For attached DB file see here: http://fmforums.com/forum/topic/82789-several-calc-problems-sn-and-index/
Lee Smith Posted March 2, 2012 Posted March 2, 2012 Both files biblio.fp7 and biblio2.fp7 show the results as you desired? I noticed that your field has a result of number and should be changed to text though, This did not effect your Let Calculation. BTW, using the comma as the decimal separator only effect the numerical fields. HTH Lee
n7mafia Posted March 2, 2012 Author Posted March 2, 2012 I am not entirely sure what you mean. By the way, what I get is: O, Vannini, Il problema giuridico del tentativo. (Art. 56 del codice penale), Milano, Giuffrè, 1952. and what I'd like to get is: O. Vannini, Il problema giuridico del tentativo. (Art. 56 del codice penale), Milano, Giuffrè, 1952.
Lee Smith Posted March 3, 2012 Posted March 3, 2012 What file are you using? As I stated, the two files with the other topic seemed to produce the results that you are asking for??
Raybaudi Posted March 3, 2012 Posted March 3, 2012 I am not entirely sure what you mean. Ciao, Lee ti ha detto che il tuo campo calcolato: Bibliografia restituisce un risultato di tipo numero anzichè, come dovrebbe, di tipo testo. Per cambiare quell'impostazione ti basterà aprire la definizione di quel campo e correggerne il risultato restituito. Comunque ti allego il tuo file modificato anche perchè ho cambiato la formula di bcooney, in modo da tenere in considerazione la possibilità che qualcuno di quei campi possa essere vuoto. ------------ Hi, Lee told you that your calculated field: Bibliography returns a value of type number instead, as it should, of type text. To change that setting you just open the definition of that field and correct the returned result. Anyway I am attaching your file changed also because I modified the bcooney's formula, in order to take into account the possibility that some of these fields may be empty. biblio2.zip
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now