You are not logged in. [Log In] Objectif Lune » Forums » PrintShop Mail 6 » Expressions, Functions and Databases » IF statements & loading text files* Register User    Forum List            FAQ
 Topic Options
 #24525 - 03/31/08 09:31 AM IF statements & loading text files* JT OL User Registered: 01/30/08 Posts: 52 I want to print a complete block of text with formatting driven by the "IF" command -When the field is blank nothing is printed, but if a value is present I need a complete block of text with a bold heading etc.How do I do this? I have tried the "TEXT_FILE" function but it just prints the file name and location.Thanks. Top
 #24526 - 03/31/08 09:51 AM Re: IF statements & loading text files* JT OL User Registered: 01/30/08 Posts: 52 For example - Code: IF([field] = "x", "", TEXT_FILE("text.rtf"))  Top
 #24527 - 03/31/08 09:55 AM Re: IF statements & loading text files* Anonymous Unregistered I changed the subject of your thread to better match your question.The function you show appears to be correct, however, if you want to load RTF files and keep the formatting, the TEXT_FILE function should be the outermost function.Also, keep in mind that you may need to supply the full path.Eample:Code:TEXT_FILE(IF([field] = "x", "","path\text.rtf")) Top
 #24528 - 03/31/08 10:10 AM Re: IF statements & loading text files* JT OL User Registered: 01/30/08 Posts: 52 Great, that works.Thanks for the quick response. Top
 #24529 - 03/31/08 11:30 AM Re: IF statements & loading text files* JT OL User Registered: 01/30/08 Posts: 52 One more question;is it possible to have data fields within the loaded text file or will it be static? Top
 #24530 - 04/01/08 03:09 AM Re: IF statements & loading text files* Anonymous Unregistered The loaded text itself is "as is". It is not interpreted like the text typed in the PSM text boxes.Inside the same text box, you can however have multiple variables, making it possible to load multiple text files inside the same box. This way you can mix loaded text files with normal variables.Note: after loading a text file, the next variable will start on the next line. A text file can however be loaded starting on the same line as a normal variable. Top