KristiM Posted October 12, 2023 Share Posted October 12, 2023 I am trying to insert a small box into a rule. I have two fields that may or may not contain data. If they have data, I need to return my graphic, a space, and the data from the field name. I have the graphic in resources and as an insert graphic rule. I have try both and either works correctly. Here is what I'm using. if (Field("allocation_name_1").length > 0) return Rule("insertbox") + " " + Field("allocation_name_1"); else return ""; I'm getting "Resource("box") Edith J. Carrier Arboretum" instead my graphic where the bold text is (The text doesn't come back as bold, nor do I want it to). Help!!! Quote Link to comment Share on other sites More sharing options...
Douglas Cogan Posted October 12, 2023 Share Posted October 12, 2023 Maybe try: return Rule("insertbox").content + " " + Field("allocation_name_1"); You'll have to check the box in the rule to return tagged text. This also requires that your image is the right size. You can also do something like: return "<graphic resource="+resourcename+" width=7200> "+Field("allocation_name_1"); 1 Quote Link to comment Share on other sites More sharing options...
KristiM Posted October 12, 2023 Author Share Posted October 12, 2023 Thank you, Douglas!!!!! I knew it was going to be something like that! I added ".content" and it worked like a charm! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.