Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Loop through image objects to make visible

DKinsley
Level 9
Level 9

I have two master pages (Page1 and Page2). Both have two image objects (TFCLogo and YFLogo) set to be invisible at the top of each master page. When the user selects one of the two companies from a drop-down list object (CoPerformingAudit), I want the corresponding logo for that company to change to visible on all pages and any new pages that are dynamically created.

I think I need a loop script in the layout:ready event but I have not been able to figure out the script. The reason I am using image objects and not image field objects is because I do not want the image data to export when merging the form data to a spreadsheet.

Currently only one logo appears on the top of the first instance of Page1 and one on the first instance of Page2. Can anyone help me with this script?

Capture.GIF

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

I've a sample that updates an image on a master page based on a radio button selection.  The code is in the calculate event of the Logo subform on the master page.

Might be a starting point

https://sites.google.com/site/livecycledesignercookbooks/home/DynamicMasterPageImage.pdf?attredirect...

Regards

Bruce

View solution in original post

2 Replies
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

I've a sample that updates an image on a master page based on a radio button selection.  The code is in the calculate event of the Logo subform on the master page.

Might be a starting point

https://sites.google.com/site/livecycledesignercookbooks/home/DynamicMasterPageImage.pdf?attredirect...

Regards

Bruce

View solution in original post

DKinsley
Level 9
Level 9

Your suggestion seems to have solved my issue. I modified your script from radio buttons to a dropdown list
and added a blank image to both master pages. I added both logos to both master pages set to invisible. I added your script for both master pages in the calculate event. Now when the user selects one of the company names from the dropdown list, that corresponding logo appears all all pages regardless if they are created using master page 1 or 2. Also, the image XML data does not export to my spreadsheet since I am using image objects instead of image field objects. Seems to work great!

Thank you, thank you, thank you!