IF statements & loading text files*

Posted by: JT

IF statements & loading text files* - 03/31/08 09:31 AM

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.
Posted by: JT

Re: IF statements & loading text files* - 03/31/08 09:51 AM

For example -

Code:
 IF([field] = "x", "", TEXT_FILE("text.rtf")) 
Posted by: Anonymous

Re: IF statements & loading text files* - 03/31/08 09:55 AM

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"))
Posted by: JT

Re: IF statements & loading text files* - 03/31/08 10:10 AM

Great, that works.

Thanks for the quick response. wink
Posted by: JT

Re: IF statements & loading text files* - 03/31/08 11:30 AM

One more question;
is it possible to have data fields within the loaded text file or will it be static?
Posted by: Anonymous

Re: IF statements & loading text files* - 04/01/08 03:09 AM

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.