biggestbossfan Posted January 7, 2013 Share Posted January 7, 2013 I have a need to use different images based on a country chosen. I have been able to make it work using a large, nested and tiresome rule and wondered if there was a more elegant way. Basically I'd like the user to choose a country from a drop-down. Based on the country chosen, some images would then be available, whilst the balance of the library would not be available. Any idea if this is possible? Quote Link to comment Share on other sites More sharing options...
esmith Posted January 7, 2013 Share Posted January 7, 2013 (edited) Would something along the lines of this work: //custom path to correct folder for each country // this line could be put in OnRecordStart callback rule to apply to multiple // image rules if necessary var path = "jobs/Projects/Postcard/Countries/" + Field("Country") + "/"; // chosen image pulled from correct sub-directory var image = CreateResource(path + Field("Picture") + ".jpg","graphic",true); return image; Edited January 7, 2013 by esmith Quote Link to comment Share on other sites More sharing options...
biggestbossfan Posted January 14, 2013 Author Share Posted January 14, 2013 Thanks - looks as if it should do the trick 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.