NPN Posted October 27, 2011 Share Posted October 27, 2011 This is for Digital Storefront. The job consists of two pages, a pick list in the 'HTML Form' returns either the value 'left' or 'right' based on choice. The rule (onrecordstart) defined as a 'callback' looks like this: if (Field("arrow") == "right") { FusionPro.Composition.SetBodyPageUsage("right", true); FusionPro.Composition.SetBodyPageUsage("left", false); } else { FusionPro.Composition.SetBodyPageUsage("right", false); FusionPro.Composition.SetBodyPageUsage("left", true); } I've set the second page as 'unused' under page usage, and i've named the pages 'right' and 'left' also under page usage. (1 is right and 2 is left). It returns page 2 (left) no matter what you choose in the pick list (arrow). What have I done wrong? Link to comment Share on other sites More sharing options...
Dan Korn Posted October 27, 2011 Share Posted October 27, 2011 Add this line to the rule: Print(Field("arrow")); And look in the log (.msg) file to see what it prints. It might not have the value you expect at composition time. Also, double-check the names of your pages. Link to comment Share on other sites More sharing options...
NPN Posted October 28, 2011 Author Share Posted October 28, 2011 Might be me that's dense, but I get a 'ReferenceError: field is not defined' on that Print line of code you gave me. I've double checked that the fieldname is indeed correct. Link to comment Share on other sites More sharing options...
Dan Korn Posted October 28, 2011 Share Posted October 28, 2011 Might be me that's dense, but I get a 'ReferenceError: field is not defined' on that Print line of code you gave me. That makes no sense. Did you copy-and-paste the code exactly from my post? Are you sure that "Field" has a capital "F"? Link to comment Share on other sites More sharing options...
NPN Posted October 31, 2011 Author Share Posted October 31, 2011 ehem ... I did not copy+paste because I translated some of the content. So i did forget the capital F. Not used to writing code myself, mostly copy+paste and editing. Thanks again, Dan, you da man. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.