Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.


Thread Tools Search this Thread Display Modes
Old February 12th, 2019, 11:15 AM
Josh Josh is offline
Forum n00b
Join Date: Oct 2016
Posts: 7
Default inserting searchable error phrase

I am trying to ensure that no matter the amount variable tagged text elements we have, that we can search the output for missing variables from the data.

I know I would have to do something along the lines of the following JS for each variable we use, but I am hoping I can do this in the OnRecordStart rule and it will work in the individual text rules that already exist outside of the ORS.

var greetingText = '<span color="' + Greet_color + '" font="' + Greet_font + '" pointsize="' + Greet_size + '">';

//Inserting Empty Field! when data is absent
if (Field("Greeting") == "")
    greetingText += "Empty Field!" + '</span>';
    greetingText += Field("Salutation") + " " + Trim(Field("Greeting")) + Field("Punctuation") + '</span>';
Reply With Quote
Old February 13th, 2019, 01:15 PM
kjacobson's Avatar
kjacobson kjacobson is offline
Regular Contributor
Join Date: Oct 2008
Location: Alameda, CA
Posts: 54
Default Re: inserting searchable error phrase

Hi Josh,

This should get you started. You can put this in your OnRecordRule and it will return "Error" when a field is empty.

for (var field in FusionPro.Fields) {
    result = Field(field);
    if (result == "") {
        result = "ERROR"
   FusionPro.Composition.AddVariable(field, result);


More information about this can be found in these threads:

UPDATE: This doesn't appear to work to replace fields placed in rules. I will see if I can find a solution unless you or someone else beats me to it. (c:

Hope this helps.

- K
Windows 7 | InDesign CC 2017 | Acrobat DC 2019 | FusionPro 11.0.8 | MarcomCentral User

Last edited by kjacobson; February 13th, 2019 at 01:23 PM.. Reason: Update
Reply With Quote
Old February 13th, 2019, 01:47 PM
Josh Josh is offline
Forum n00b
Join Date: Oct 2016
Posts: 7
Default Re: inserting searchable error phrase


That worked wonderfully!

Thanks a bunch!!!
Reply With Quote

error, onrecordstart, search

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.