Jump to content

Expression Image Swap


rsager

Recommended Posts

  • 5 weeks later...

Dan the Frodo Travel tutorial's example has the user picking the expression from a drop down list. I would like my users to choose a jpg file so they can see a preview of the expression first. Can I reference a jpg file in my rule that when picked will select the correct FPX expression file?

My images are; Kenya.jpg, Ireland.jpg and Kenya.jpg

 

PI Rule:

 

var FPA=Field("City");

var FPB=ReplaceSubstring(FPA, " ","");

var FPX=(FPB+"FPX");

var myPI = Resource(FPX);

 

var Var1="Name";

var Var2=ReplaceSubstring(Field(Var1)," ","#");

 

if (FPA=="Kenya")

{

myPI.AddData(Var2 + "#Was#Here!");

}

if (FPA=="Ireland")

{

myPI.AddData(Var2);

}

if (FPA=="Italy")

{

myPI.AddData(Var2);

}

else

{

myPI.AddData(Field(Var1));

}

 

return myPI;

Link to comment
Share on other sites

Thanks Dan. This is exactly what we are looking for.

We are creating an Expression Calendar. All the jpg and fpx files are uploaded into MarcomCentral. We want the users to choose the expression for each month but wanted a way for the user to see a preview of the expression first.

 

Bob

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