Sitemap

Amicuk Programming Answers

Toggle image in gallery

2015-10-11   Views:2

Advertisement

Trying to create a login/logout application. Can't figure out how to get an image to toggle between two states. See below for reference.. The data in the black box is all from one gallery (data source) except for the "Out" image which I inserted

Trying to create a login/logout application. Can't figure out how to get an image to toggle between two states. See below for reference..
The data in the black box is all from one gallery (data source) except for the "Out" image which I inserted into the template.
I need to be able to toggle the "out" image to an "In" image for each independent item in the gallery. I've tried If/Then statements; UpdateContext with toggle-like switches of 1 & 0.; Inserting inside the template / Outside the template.
I've created separate collections and more. I am at a complete loss for how to do this. Nothing seems to work.
Theoretically this should be as simple as referencing a cell in a spreadsheet but without the ability to dynamically update a cell with input from the application - the whole exercise is mute.
I really need help with this. I have an entire fantastic application that is 90% complete except for this one 'seemingly' simple flaw. But if this flaw can't be worked out then the entire exercise is worthless and a giant waste of time.
Please help.

The replay answer
Advertisement
Hi Michael,
If I understand the scenario, an Image Gallery is bound to a Table which has at least one column with links to people's photo. When you toggle a switch, the image should switch to another image to indicate the person is Out.
First add the image that you want to display when the person is Out. To do this:
Click on the Image visual in the Image Gallery
Click on the Image property and select Add Image. Select the image you want to import from your local computer. I will assume the image name is
OutImage.
Then add the toggle logic. For this I will assume that the table has a column named
Photo containing the links to the photos. Click again on the Image Visual and edit its
Image property to:
If(ToggleSwitch1!Value, OutImage, ThisItem!Photo)
This statement indicates that the Image for the Image visual is OutImage
if the Toggle is On, or the current item Photo if the toggle is Off.

Go to See the other 2 answers

Hot
Say if I have like more than one file upload field in my form, is there a way where I can do the upload of all the files together just like what I usually do in HTML? I am having the problem to do this because apparently, PHP only receives the $_FILE [More]
Hi everyone, I've installed yosemite, no problem at first time.... yesterday i've turn on mb pro, closed the notebook during boot time... ->error. Now the OS don't start end still remain at middle loading, then I've tried the recover (command+R). Wel [More]
This message is for Mr. Rob Misek. Hi, Rob, As per our talk on the phone this morning, I have attached my cache confif file and a stubbed version of our CacheStore implementation(this is all we have at this moment). And also, the exception. Thank you [More]
Any website that send me to a .pdf file will not open if I'm using firefox. In order to print postage from usps.com, for example, an Acrobat window has to open, and it won't.Pat, thanks for your reply. I finally had some time to look further into thi [More]
There seem to be a lot of threads going on about connectivity problems regarding disks connected to Airport Extreme base stations. This http://discussions.apple.com/thread.jspa?threadID=1155412 is probably the biggest. Since this really is a large is [More]
I just installed RoboHelp 8. When I view a topic page that is longer than the window, sometimes the vertical scroll bars appear and sometimes they don't. If I click the <> HTML tab and then click the Design tab again, the scroll bar appears. The scr [More]
so I typed that in from the original 240 in the image size window (I tryed to compare the two by cropping the same section in each file, 240 and 600 ppi, and that was quite tricky so I gave up), but my feeling is there isn't much difference in resolu [More]
In attempting to run a lead update, I got the following exception in Visual Studio(C#) As determined by the first instance, all subsequent instances of integration component 'Lead_Action' should use the same user key 'User Key:1'(SBL-EAI-04404) The c [More]
Hi: Do I need to use, in my pl/sql triggers and procedures, the SELECT FOR UPDATE NOWAIT sentence, to avoid locks before using update table sentences ? Is it common to use it on stored procedures and triggers? Thanks Joao OliveiraFirst, what, exactly [More]
hi,    what is the table for the transfer orders? thanks in advance..Hi, <b>Create delivery via transfer orders:</b> Once the order is saved proceed through the following steps. The process assumes the item has values in the warehouse bin. < [More]