I have an executive action that I am trying to execute. It works perfectly until the correct combinations of variables is correct, then this does not work:
So I have 6 conditions where they must be all met.
Once they are all met, they should do:
But when they are all met, it just does nothing. It will not change the state of my box or show the next button. If I click on a wrong box to highlight it, then it works again, but every time I have the correct combination clicked it just freezing up.
What I am trying to do, they have to click the correct graphs to answer the question, once they get the right sequence of graphs clicked the next button shows up. I have a square over each graph with no color or outline that has a clicked state and it turns green when clicked and does not show if not clicked or clicked a second time. If I have the wrong graphs clicked, the second box of If statements works fine and the green shading shows/disappears as they should.
My untitled 2 which is the second round of conditional tab - I only have two. This section works perfectly.
I have captivate 188.8.131.526.
What am I doing wrong?
I noticed some of your conditions say if greater than 0 and some say equal to 0
Not sure how you click boxes are setting those variables.
Could that be part of the problem?
I don't think so, because it is working great except when all of them are at the correct setting. I have done this before, just not with so many.
A strategy I like to use is to place smartshapes on screen to display all my variable values so I can verify that they are changing WHEN I want them to and TO THE VALUE that I want them to.
It is a good way to troubleshoot and can lead you in the right direction to solving the issue.
Just a small smartShape with text $$myVar$$ placed inside.
Replace myVar with the name of your variable.
Question - The correct setting is where you expect the changes to happen, right? If it works great except when the settings are correct - does that mean nothing happens when the settings are incorrect? That would seem logical and would simply mean the settings are broken somewhere.
How do you know that the variables match your setting criteria? That's what the above strategy will help figure out.
It is a pain to try to understand your advanced actions. Please use the Preview window, where we can see multiple and complete decisions in one view. You open that Preview window using the first button (arrow) in the top right control panel. Especially since I have not even any idea how many decisions you have used. See this screenshot:
There are unnecessary commands in the shown actions. Bu default any advanced action will keep the slide paused if the button triggering that action has a pausing point. Please show the Timeline, so that it is possible to see the triggering buttons. Adding a Pause command makes no sense whatsoever. In one action you add Continue, which makes sense if you want to override the pause by the pausing point.
If you want help, these details are needed:
The next button is hidden initially. I kept one pause point at the very end to keep it from going to the next slide prior to them answering correctly.
What I am doing is creating 7 boxes that go over top the 7 graphs in this slide, the top left hand graph does not get one.
When they click on a graph, the invisible box over top of it turns green to indicate that they have clicked on it. Their variable gets assigned a 2. If they click on it again, the green box turns back to invisible to indicate they have unselected it. Their variable gets reassigned back to a 0. So once the variables are all correct, the next arrow should come up. (7 variables in all, but if they are clicking on the 7th one, I know what is going on with that one, so I only have to look at the other 6). So I guess I can clean up the ones that I have 7 in there.
FC - I have tried removing the pause and played around with things and cannot get it to work. I have done something similar with less variables and I had to have the pause in there prior to showing the next button for it to work.. no idea why???
Right now I am leaning towards an issue related to the order of operations.
An example might be checking for the conditions and then changing the variable rather than changing the variable and then checking if it meets the critera.
Something along that order. Like things are out of sync.
Still very hard to read. Please take out those unnecessary Pause commands.
Since you never disable the first shape button, it is OK that you only have that one pausing the slide, but I would have kept the pausing point for all interactive objects at the same moment. It is just before the end of the slide, which is fine.
However: if Untitled2 is always before Untitled1 there is something illogical.:
I first thought it was a conflict with a label being used twice for different items (variable and button) but don't feel up to checking that. However I think it is the logical bug in your advanced actions which I just described which is the problem.
It would be a much better idea to rethink the advanced action and convert it to a shared action. You have forgotten that in an advanced action you cannot break out of the action as is possible with a normal programming lanugage. The sequence is imposed: top to bottom and left to right. Maybe you could reverse the two decisions and try again. Sorry, I couldn't do it because it is still a mystery to me how you populate the variables and why some conditions use a different operator (greater than instead of equal to).
I thought if untitled 2 was true, it would not go to untitled 1? I thought it only went there is Untitled 2 was false. Is that not the case? I understand why it is not working if it is not the case. Is there a way to make it only go to Untitled 1 if untitled 2 is false?
That is the nature of an IF / ELSE statement
if something is true - do this
otherwise - do this
Untitled 1 has an IF / ELSE statement but Untitled 2 is a separate IF action on its own without any ELSE parameters
So can you nested multiple IF statements in this? Under one untitled?
I do not believe so - I think you would need to be careful in setting up additional tabs in the proper way to avoid the conflicts.
You can do nesting with coding directly.
That was my suggestion to switch the decisions back to the original sequence. I have no idea why you reordered them.
Each method, advanced/shared action or JS programming language, has its advantages and disadvantages. Important is that you know the 'rules' and - for a programming language - that includes the syntax rules. For this particular use case, it seems overkill for me although I have been programming since many decades. Much easier with a shared action, no need for syntax debugging. But Greg uses JS for almost everything, very logical that he will prefer JS.
One of the first things to learn about advanced actions is that it ALWAYS will read and execute all commands, as I wrote before: from top to bottom and from left to right. You need to rethink your advanced action setup and take that into account. It is really worthwhile to take some training or read some tutorials about advanced actions.
It is perfectly possible to make it work, but there is no way to only go to the second decision if the first one is false.
For starters with advanced actions I always give tips:
I would have given you a solution if I had a complete view of the actions and the difficult labels. But I recommend to take some training about advanced actions. Alternative would be to skip them and learn a full-blown programming language.
Reflect on the possible situations you'll have and put each of them in a decision. Do this with pen and paper or a digital alternative, but not in Captivate. Is it necessary to combine 'equal to' and 'greater than' operators? I don't see why that is needed.
No problem. I know why it is not working. I can get it working. I just have to change how I did it. thank you again! You are always very helpful.
OK, fine. You probably will not forget this particular feature anymore. Everyone learns most from their bugs, have struggled with this multiple times when I started using Advanced actions. However I insist that a shared action could be a better idea, but it needs a different mind set.