Jump to content

IF... ELSE Rule


MikeVM

Recommended Posts

HI,

 

I stuck with what seems to be an easy rule...

We creating a template where client can select "predefined" name from drop-down menu or type his/her own in the "custom field" if selected "predefined" value= Custom Name.

 

this is my code which works perfectly off-line (in Acrobat) and does not online - Custom Name returned when this value seklected from drop-down menu instead of value of Field ("custom name").

 

Any help?

 

if (Field("predefined") == ""

return "";

else

{

if (Field("predefined") == "Custom Name"

return Field("custom name");

else

return Field("predefined");

}

Link to comment
Share on other sites

Remember that you're not using the same data file when composing under MarcomCentral as when you're composing in FP Desktop. So the data might be slightly different. It could be that MarcomCentral is putting something else other than the plain text in the data field. Or maybe there's an extra space somewhere, in which case the Trim function might help.

 

I would try simply putting the "predefined" field into a text frame and looking at the output to see what it contains. Better yet, return that field from a rule with the "Treat returned strings as tagged text" box UNchecked and place that rule in a text frame to see whatever tagging the field value might also contain.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...