Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any way to control the order that actions are run or should I go back to macros?
Hi,
Within the same object (say, a button), actions are run from top to down, the first in the list of actions will run first, and so on. If you have some OnOpen triggered actions, this will run prior to any other action.
Is that what you were looking for?
Miguel
Hi Miguel,
On this topic, I have a button that runs 3 actions:
1. Select in Field: Field=%PointInTime, Search string = (Daily*|MTD*|QTD|YTD)
2. Run a macro (enables/disables chart expressions)
3. Set Variable: Variable=vPiT_Choices_LastSet, Value = Concat(DISTINCT %PointInTime,',')
Looking at this you would expect the variable in step 3 to set to the result of the Select in Field action (step 1) which is what I want. However, you have to click the button twice for this to work. My tests are showing that the result of step 1 is ignored by step 3.
Any ideas?
Thanks,
Jason
Hello
I have the same issue, I need to click my button twice for all 3 actions to execute. Were you able to resolve this?
Thanks,
Ben
Afraid not. It's a bug in QV where a string of actions doesn't respect its own field changes. I had to split them into two places.
Jason, by splitting it into 2 places, do you have 2 seperate buttons now or did you do something else. Thanks.
The doc does say that "The actions will be executed in the order in which they appear in the list.", but I've never had any luck getting them to execute serially.
-Rob
I think so. Something like a Save and an Update/Apply button.
There seems to be an undocumented rule like "Set before select" ... call it a bug or not ... If you have a block of actions within a button or textbox or trigger and intend to use a SET VARIABLE action after a SELECT-action (like SELECT FIELD or CLEAR FIELD or others....) and you expect to get the result from that selection into the variable, you will NOT get it. The variable will be set before the selection change becomes effective, no matter in which sequence you put it.
This is the status until today (QV 11.2 SR3)
WORKAROUND - HELP WITH ANOTHER TRIGGER (Not for Ajax!)
If you like to get a field value into a variable after you changed the selection in the same action, you will need the following "ingredients":
The point of time, when the on-select field trigger is executed, is then indeed AFTER the selections made by the action button and will deliver the desired result. It is demonstrated on the below example, where the green action button
See https://dl.dropboxusercontent.com/u/92495732/Action%20Set%20Variable.qvw
I have to admit, that the Ajax Client only executes one action block at a time. If one action sets a field, which has a trigger on it, Ajax client (or Web preview) does not execute the trigger. If you manually change the field (the one with the trigger) in Ajax, the trigger will be fired. So: My above example is not Ajax-ready!
Same issue here.
Made 3 actions on a button to switch the contents of 2 variables A and B:
- set variable 'temp' to the value of 'A'
- set the variable 'A' to the value of variable 'B'
- set the variable 'B' to the value of variable 'temp'
But, this doesn't work.
I think it's a 'bug'.
Any other solution to switch variable value between 2 varaiables ?