Jump to content

insert a graphic resource into an if/then rule


KristiM

Recommended Posts

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!!!

Link to comment
Share on other sites

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");
 

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...